Changeset 1300 in josm


Ignore:
Timestamp:
2009-01-19T13:36:25+01:00 (16 years ago)
Author:
stoecker
Message:

Apply patch from #440

File:
1 edited

Legend:

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

    r1183 r1300  
    206206        this.data = data;
    207207        this.gps = gps;
     208        final Layer self = this;
    208209        mouseAdapter = new MouseAdapter(){
    209210            @Override public void mousePressed(MouseEvent e) {
     
    239240            public void layerAdded(Layer newLayer) {}
    240241            public void layerRemoved(Layer oldLayer) {
    241                 Main.map.mapView.removeMouseListener(mouseAdapter);
     242                if (oldLayer == self)
     243                    Main.map.mapView.removeMouseListener(mouseAdapter);
    242244            }
    243245        });
Note: See TracChangeset for help on using the changeset viewer.