Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Layer Selection

M.S.Bachler wrote:

Ah, maybe I am approaching this from the wrong angle.
All I actually want to achieve is when I select a layer programmatically, the 'Selection' view changes to hold the correct data. This currently happens when you actually select the layer using the Layer View (hence my attempts to trigger it this way).
But maybe there is another way to get this to happen.
I had hoped that it was all done through some eventing mechanism and that when I set the selected layer throught my code the apporpriate events would be fired and if the Selection View was open, it would change it's contents.
But that does not happen.
Q: Do I need to do this myself somehow, i.e. check that the Selection View is there and if it is ask it to redraw with the contents for the current layer?
or trigger some event somewhere?

Hi Michelle,

It looks like we need to make a few more small changes to the framework to support this, unless i'm missing something. Obviously we only want to refresh views which are visible, and we need a good place to hook into (probably the MapEditor). Either each view or the map editor itself can ask: am I visible? and then refresh the view(s).

I wrote a quick plugin to demonstrate this, and none of the views are refreshed unless the layers view has the focus. One might be able to hack this to function the same way the layers view forces the refresh, but that doesn't seem right.

Cheers,
Cory.


Back to the top