Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Custom action on activating/deactivating layers
Custom action on activating/deactivating layers [message #1723634] Tue, 16 February 2016 22:09 Go to next message
Nikolay Manolov is currently offline Nikolay ManolovFriend
Messages: 24
Registered: June 2012
Junior Member
I have layers that should not be used together, meaning the displayed information would be confusing. The intended use is to have either one or the other. By default this would require that the user navigates the layer drop-down menu twice; once to enable one and again to disable the other layer. Is it possible to execute some code when a layer is activated (namely, to deactivate the other layer) so the user only need to click once ? Perhaps some kind of listener?

Regards,
Nik
Re: Custom action on activating/deactivating layers [message #1723761 is a reply to message #1723634] Wed, 17 February 2016 17:02 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello Nikolay,

I think you should be able to achieve this by adding a
ModelChangeTrigger (added to the session event broker), reacting only on
notification about layer activation. In this ModelChangeTrigger you
should then check if the activated layer is one of these "conflicting"
layer and in this case deactivate the other layer.

Regards,
Steve

Le 16/02/2016 23:09, Nikolay Manolov a écrit :
> I have layers that should not be used together, meaning the displayed
> information would be confusing. The intended use is to have either one
> or the other. By default this would require that the user navigates the
> layer drop-down menu twice; once to enable one and again to disable the
> other layer. Is it possible to execute some code when a layer is
> activated (namely, to deactivate the other layer) so the user only need
> to click once ? Perhaps some kind of listener?
>
> Regards,
> Nik


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Relation Based Edge: find targets by name
Next Topic:Layers contribute to same container mapping (reuse/import)
Goto Forum:
  


Current Time: Tue Apr 23 07:04:44 GMT 2024

Powered by FUDForum. Page generated in 0.03069 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top