Hi Ede,

I changed the way to control addition/removal of LayerListeners.
I keep a reference to the listeners in components in charge of creating them (AttributeTab, OneLayerAttributeTab...), and I remove these listeners from the LayerManager when the JInternalFrame which added them is closed.

Please have a look and let me know if you can see a flaw or a better approach.

I'll try to do more controls later.

Michaël


Le 05/06/2018 à 12:53, edgar.sol...@web.de a écrit :
same goes for AttributeTab as far as i can see. ede

On 05.06.2018 12:46, edgar.sol...@web.de wrote:
Mike,

this looks like the layer listner get's removed on any layers removal, not just 
the one the plugin shows the attributes for currently. did you check this? ..ede

line 185ff.

       LayerListener layerListener = new LayerListener() {
         public void layerChanged(LayerEvent e) {
           if (attributeTab.getLayer() != null) {
             updateTitle(attributeTab.getLayer());
           }
           // Layer REMOVE [mmichaud 2012-01-05]
           if (e.getType() == LayerEventType.REMOVED) {
             if (e.getLayerable() == attributeTab.getLayer()) {
               attributeTab.getModel().dispose();
               context.getWorkbenchFrame().removeInternalFrame(
                       ViewAttributesFrame.this);
               dispose();
             }
             context.getLayerManager().removeLayerListener(this);
           }
         }
...

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to