Changeset 13264 in josm


Ignore:
Timestamp:
2017-12-30T18:38:36+01:00 (3 weeks ago)
Author:
Don-vip
Message:

see #15709 - proper singleton for ImageryViewerDialog

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

    r13206 r13264  
    10311031        MapFrame map = MainApplication.getMap();
    10321032        if (map.getToggleDialog(ImageViewerDialog.class) == null) {
    1033             ImageViewerDialog.newInstance();
    10341033            map.addToggleDialog(ImageViewerDialog.getInstance());
    10351034        }
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r13220 r13264  
    6060    private boolean collapseButtonClicked;
    6161
    62     static void newInstance() {
    63         dialog = new ImageViewerDialog();
    64     }
    65 
    6662    /**
    6763     * Replies the unique instance of this dialog
     
    7066    public static ImageViewerDialog getInstance() {
    7167        if (dialog == null)
    72             throw new AssertionError("a new instance needs to be created first");
     68            dialog = new ImageViewerDialog();
    7369        return dialog;
    7470    }
Note: See TracChangeset for help on using the changeset viewer.