Changeset 2720 in josm for trunk


Ignore:
Timestamp:
2009-12-31T14:52:54+01:00 (15 years ago)
Author:
bastiK
Message:

fixed #4100 (no Main.map available when loading an image using open without previously loading data)

File:
1 edited

Legend:

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

    r2719 r2720  
    237237                layer.hook_up_mouse_events(); // Main.map.mapView should exist
    238238                // now. Can add mouse listener
     239                Main.map.mapView.addPropertyChangeListener(layer);
     240                if (!addedToggleDialog) {
     241                    Main.map.addToggleDialog(ImageViewerDialog.getInstance());
     242                    addedToggleDialog = true;
     243                }
    239244
    240245                if (! cancelled && layer.data.size() > 0) {
     
    262267        Loader loader = new Loader(files, gpxLayer);
    263268        Main.worker.execute(loader);
    264         if (!addedToggleDialog) {
    265             Main.map.addToggleDialog(ImageViewerDialog.getInstance());
    266             addedToggleDialog = true;
    267         }
    268269    }
    269270
     
    275276        this.data = data;
    276277        this.gpxLayer = gpxLayer;
    277         Main.map.mapView.addPropertyChangeListener(this);
    278278    }
    279279
Note: See TracChangeset for help on using the changeset viewer.