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/GeoImageLayer.java

    r2931 r2969  
    236236                Main.main.addLayer(layer); 
    237237                layer.hook_up_mouse_events(); // Main.map.mapView should exist 
    238                 // now. Can add mouse listener 
     238                                              // now. Can add mouse listener 
    239239                Main.map.mapView.addPropertyChangeListener(layer); 
    240                 if (!addedToggleDialog) { 
    241                     // TODO Workaround for bug in DialogsPanel 
    242                     // When GeoImageLayer is added as a first layer, division by zero exception is thrown 
    243                     // This is caused by DialogsPanel.reconstruct method which use height of other dialogs 
    244                     // to calculate height of newly added ImageViewerDialog. But height of other dialogs is 
    245                     // zero because it's calculated by layout manager later 
    246                     SwingUtilities.invokeLater(new Runnable() { 
    247                         public void run() { 
    248                             Main.map.addToggleDialog(ImageViewerDialog.getInstance()); 
    249                         } 
    250                     }); 
    251                     addedToggleDialog = true; 
     240                if (Main.map.getToggleDialog(ImageViewerDialog.class) == null) { 
     241                    System.err.println("JO"); 
     242                    ImageViewerDialog.newInstance();// = new ImageViewerDialog(); 
     243                    Main.map.addToggleDialog(ImageViewerDialog.getInstance()); 
    252244                } 
    253245 
     
    271263    } 
    272264 
    273     private static boolean addedToggleDialog = false; 
    274  
    275265    public static void create(Collection<File> files, GpxLayer gpxLayer) { 
    276266        Loader loader = new Loader(files, gpxLayer); 
     
    291281        return ImageProvider.get("dialogs/geoimage"); 
    292282    } 
    293      
     283 
    294284    public static interface LayerMenuAddition { 
    295285        public Component getComponent(Layer layer); 
     
    306296        JMenuItem correlateItem = new JMenuItem(tr("Correlate to GPX"), ImageProvider.get("dialogs/geoimage/gpx2img")); 
    307297        correlateItem.addActionListener(new CorrelateGpxWithImages(this)); 
    308          
     298 
    309299        List<Component> entries = new ArrayList<Component>(); 
    310300        entries.add(new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this))); 
     
    323313 
    324314        return entries.toArray(new Component[0]); 
    325          
     315 
    326316    } 
    327317 
     
    335325        + " " + trn("{0} was found to be GPS tagged.", "{0} were found to be GPS tagged.", i, i); 
    336326    } 
    337      
     327 
    338328    @Override public Object getInfoComponent() { 
    339329        return infoText(); 
     
    752742        Main.map.mapView.repaint(); 
    753743    } 
    754      
     744 
    755745    public List<ImageEntry> getImages() { 
    756746        List<ImageEntry> copy = new ArrayList<ImageEntry>(); 
Note: See TracChangeset for help on using the changeset viewer.