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 <jod...@gm...>
Envoyé : 12 décembre 2023 15:44
À : Sympatico <pie...@sy...>
Cc : geo...@li...
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 <pie...@sy... <mailto:pie...@sy...> > 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
Geo...@li... <mailto:Geo...@li...>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
|