Changeset 6107 in josm
- Timestamp:
- 2013-08-03T02:06:28+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
r6087 r6107 32 32 import org.openstreetmap.josm.gui.widgets.JosmTextField; 33 33 34 35 34 public class ImageryAdjustAction extends MapMode implements MouseListener, MouseMotionListener, AWTEventListener{ 36 35 static ImageryOffsetDialog offsetDialog; … … 58 57 layer.setVisible(true); 59 58 } 59 oldDx = layer.getDx(); 60 oldDy = layer.getDy(); 61 addListeners(); 62 offsetDialog = new ImageryOffsetDialog(); 63 offsetDialog.setVisible(true); 64 } 65 66 protected void addListeners() { 60 67 Main.map.mapView.addMouseListener(this); 61 68 Main.map.mapView.addMouseMotionListener(this); 62 oldDx = layer.getDx();63 oldDy = layer.getDy();64 69 try { 65 70 Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.KEY_EVENT_MASK); 66 71 } catch (SecurityException ex) { 67 72 } 68 offsetDialog = new ImageryOffsetDialog();69 offsetDialog.setVisible(true);70 73 } 71 74 … … 77 80 offsetDialog = null; 78 81 } 82 removeListeners(); 83 } 84 85 protected void removeListeners() { 79 86 try { 80 87 Toolkit.getDefaultToolkit().removeAWTEventListener(this); 81 88 } catch (SecurityException ex) { 82 89 } 83 Main.map.mapView.removeMouseListener(this); 84 Main.map.mapView.removeMouseMotionListener(this); 90 if (Main.isDisplayingMapView()) { 91 Main.map.mapView.removeMouseMotionListener(this); 92 Main.map.mapView.removeMouseListener(this); 93 } 85 94 } 86 95 … … 265 274 } 266 275 } 276 277 @Override 278 public void destroy() { 279 super.destroy(); 280 removeListeners(); 281 this.layer = null; 282 this.oldMapMode = null; 283 } 267 284 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
r6069 r6107 596 596 } 597 597 } 598 599 @Override 600 public void destroy() { 601 super.destroy(); 602 Main.pref.removePreferenceChangeListener(this); 603 } 598 604 } -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r6100 r6107 210 210 public MouseEvent lastMEvent = new MouseEvent(this, 0, 0, 0, 0, 0, 0, false); // In case somebody reads it before first mouse move 211 211 212 private LinkedList<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>();212 private final LinkedList<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>(); 213 213 214 214 private BufferedImage nonChangedLayersBuffer; … … 954 954 mapMover.destroy(); 955 955 } 956 activeLayer = null; 957 changedLayer = null; 958 editLayer = null; 959 layers.clear(); 960 nonChangedLayers.clear(); 961 temporaryLayers.clear(); 956 962 } 957 963
Note:
See TracChangeset
for help on using the changeset viewer.