Ignore:
Timestamp:
12.02.2010 20:01:55 (2 years ago)
Author:
bastiK
Message:

fixed #4502 - Photomapping pannel open just one time;
make tiger highlight color a little transparent (see #2381)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r2931 r2969  
    4444    private boolean centerView = false; 
    4545 
    46     // Only one instance of that class 
    47     static private ImageViewerDialog INSTANCE = null; 
     46    // Only one instance of that class is present at one time 
     47    private static ImageViewerDialog dialog; 
    4848 
    4949    private boolean collapseButtonClicked = false; 
    5050 
     51    static void newInstance() { 
     52        dialog = new ImageViewerDialog(); 
     53    } 
     54 
    5155    public static ImageViewerDialog getInstance() { 
    52         if (INSTANCE == null) { 
    53             INSTANCE = new ImageViewerDialog(); 
    54         } 
    55         return INSTANCE; 
     56        if (dialog == null) { 
     57            throw new AssertionError(); // a new instance needs to be created first 
     58        } 
     59        return dialog; 
    5660    } 
    5761 
     
    6367        super(tr("Geotagged Images"), "geoimage", tr("Display geotagged images"), Shortcut.registerShortcut("tools:geotagged", tr("Tool: {0}", tr("Display geotagged images")), KeyEvent.VK_Y, Shortcut.GROUP_EDIT), 200); 
    6468 
    65         if (INSTANCE != null) { 
    66             throw new IllegalStateException("Image viewer dialog should not be instanciated twice !"); 
    67         } 
    68  
    6969        /* Don't show a detached dialog right from the start. */ 
    7070        if (isShowing && !isDocked) { 
    7171            setIsShowing(false); 
    7272        } 
    73  
    74         INSTANCE = this; 
    7573 
    7674        JPanel content = new JPanel(); 
     
    254252            //    osd.append(tr("\nImage gps time: {0}", Long.toString(entry.getGpsTime().getTime()))); 
    255253            //} 
    256              
     254 
    257255            imgDisplay.setOsdText(osd.toString()); 
    258256        } else { 
Note: See TracChangeset for help on using the changeset viewer.