Hi Jody,
Now what I see is that there is no code inside the function "MapLayerTable$Listener.layerMoved(MapLayerListEvent)" of the file "MapLayerTable.java" @Override public void layerAdded(MapLayerListEvent event) { if (event.getLayer() == null) { List<Layer> layers = table.mapPane.getMapContent().layers(); for (Layer l : layers.subList(event.getFromIndex(), event.getToIndex() + 1)) { table.onAddLayer(l); } } else { table.onAddLayer(event.getLayer()); } } @Override public void layerRemoved(MapLayerListEvent event) { table.onRemoveLayer(event.getLayer()); } @Override public void layerChanged(MapLayerListEvent event) { table.repaint(event.getLayer()); } @Override public void layerMoved(MapLayerListEvent event) {} @Override public void layerPreDispose(MapLayerListEvent event) {} Regards, Pierre De : Jody Garnett <jody.garn...@gmail.com> Envoyé : 12 décembre 2023 15:44 À : Sympatico <pierre.cardi...@sympatico.ca> Cc : geotools-gt2-users@lists.sourceforge.net Objet : Re: [Geotools-gt2-users] MapLayerTable and MapComponent - GeoTools 30 Can you step through with a debugger and see what has gone wrong? It feels like something some list copy (for thread safety) has gone wrong. There are not that many desktop users of GeoTools presently, I am glad you are using the functionality. On Tue, Dec 12, 2023 at 12:07 PM Sympatico <pierre.cardi...@sympatico.ca <mailto:pierre.cardi...@sympatico.ca> > wrote: Hi, I am using JMapFrame in my application. When I add a new Layer, the components MapContent and MapLayerTable are synchronized regarding Layers. But if used the function MapContent.moveLayer(pos1, pos2) to change de zOrder off a Layer, then the order of the Layers in the MapLayerTable is no more synchronized with the order of the Layers in the MapContent. Any idea about this situation ? Regards, Pierre _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net <mailto:GeoTools-GT2-Users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users