Changeset 13289 in josm
- Timestamp:
- 2018-01-07T02:34:47+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/layer/geoimage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r13265 r13289 1000 1000 MapFrame map = MainApplication.getMap(); 1001 1001 if (map.getToggleDialog(ImageViewerDialog.class) == null) { 1002 ImageViewerDialog.createInstance(); 1002 1003 map.addToggleDialog(ImageViewerDialog.getInstance()); 1003 1004 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r13265 r13289 59 59 private boolean collapseButtonClicked; 60 60 61 static void createInstance() { 62 if (dialog != null) 63 throw new IllegalStateException("ImageViewerDialog instance was already created"); 64 dialog = new ImageViewerDialog(); 65 } 66 61 67 /** 62 68 * Replies the unique instance of this dialog … … 65 71 public static ImageViewerDialog getInstance() { 66 72 if (dialog == null) 67 dialog = new ImageViewerDialog();73 throw new AssertionError("a new instance needs to be created first"); 68 74 return dialog; 69 75 }
Note:
See TracChangeset
for help on using the changeset viewer.