Changeset 18941 in josm for trunk/src/org


Ignore:
Timestamp:
2024-01-19T09:06:03+01:00 (10 months ago)
Author:
GerdP
Message:

fix #23408

  • fix crash when lots of GeoImageLayer layers are closed without and no data layer is open
  • don't show save layers dialog when no save or upload action is available.
Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r18752 r18941  
    123123                AbstractModifiableLayer odl = (AbstractModifiableLayer) l;
    124124                if (odl.isModified() &&
    125                         ((!odl.isSavable() && !odl.isUploadable()) ||
     125                        (odl.isSavable() || odl.isUploadable() ||
    126126                                odl.requiresSaveToFile() ||
    127127                                odl.requiresUploadToServer())) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r18871 r18941  
    744744        mapModeListener = (oldMapMode, newMapMode) -> {
    745745            MapView mapView = MainApplication.getMap().mapView;
     746            mapView.removeMouseListener(mouseAdapter);
     747            mapView.removeMouseMotionListener(mouseMotionAdapter);
    746748            if (newMapMode == null || isSupportedMapMode(newMapMode)) {
    747749                mapView.addMouseListener(mouseAdapter);
    748750                mapView.addMouseMotionListener(mouseMotionAdapter);
    749             } else {
    750                 mapView.removeMouseListener(mouseAdapter);
    751                 mapView.removeMouseMotionListener(mouseMotionAdapter);
    752751            }
    753752        };
Note: See TracChangeset for help on using the changeset viewer.