Changeset 18940 in josm for trunk/src/org
- Timestamp:
- 2024-01-16T08:06:33+01:00 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r18939 r18940 147 147 MapFrame map = MainApplication.getMap(); 148 148 synchronized (ImageViewerDialog.class) { 149 if (dialog != null) { 150 if (map != null && map.getToggleDialog(ImageViewerDialog.class) != null) { 151 map.removeToggleDialog(dialog); 152 } 153 if (!dialog.isDestroyed()) { 154 dialog.destroy(); 155 } 149 if (dialog != null && map != null && map.getToggleDialog(ImageViewerDialog.class) != null) { 150 map.removeToggleDialog(dialog); 156 151 } 157 152 } … … 303 298 if (geoImageLayers.isEmpty()) { 304 299 this.layers.setVisible(false); 305 hideNotify();306 if (hasInstance())307 destroyInstance();308 300 } else { 309 301 this.layers.setVisible(true); … … 430 422 } 431 423 432 private boolean isDestroyed() {433 return this.titleBar == null;434 }435 436 424 /** 437 425 * This literally exists to silence sonarlint complaints. … … 1128 1116 } 1129 1117 this.updateLayers(true); 1118 if (!layers.isVisible()) { 1119 hideNotify(); 1120 destroy(); 1121 } 1130 1122 } 1131 1123
Note:
See TracChangeset
for help on using the changeset viewer.