- Timestamp:
- 2009-02-16T15:24:57+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DeleteAction.java
r1169 r1418 25 25 26 26 public void actionPerformed(ActionEvent e) { 27 if(!Main.map.mapView.isVisibleDrawableLayer()) 28 return; 27 29 new org.openstreetmap.josm.actions.mapmode.DeleteAction(Main.map) 28 30 .doActionPerformed(e); -
trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r1415 r1418 95 95 if (e.getButton() != MouseEvent.BUTTON1) 96 96 return; 97 if(!Main.map.mapView.is DrawableLayer())97 if(!Main.map.mapView.isVisibleDrawableLayer()) 98 98 return; 99 99 boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r1379 r1418 126 126 */ 127 127 @Override public void mouseDragged(MouseEvent e) { 128 if(!Main.map.mapView.isVisibleDrawableLayer()) 129 return; 128 130 if (mode == Mode.select) return; 129 131 … … 193 195 */ 194 196 @Override public void mousePressed(MouseEvent e) { 197 if(!Main.map.mapView.isVisibleDrawableLayer()) 198 return; 195 199 if (!(Boolean)this.getValue("active")) return; 196 200 if (e.getButton() != MouseEvent.BUTTON1) … … 220 224 */ 221 225 @Override public void mouseReleased(MouseEvent e) { 226 if(!Main.map.mapView.isVisibleDrawableLayer()) 227 return; 222 228 restoreCursor(); 223 229 if (selectedSegment == null) return; -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r1412 r1418 145 145 */ 146 146 @Override public void mouseDragged(MouseEvent e) { 147 if(!Main.map.mapView.isVisibleDrawableLayer()) 148 return; 149 147 150 cancelDrawMode = true; 148 151 if (mode == Mode.select) return; … … 283 286 */ 284 287 @Override public void mousePressed(MouseEvent e) { 288 if(!Main.map.mapView.isVisibleDrawableLayer()) 289 return; 290 285 291 cancelDrawMode = false; 286 292 if (! (Boolean)this.getValue("active")) return; … … 332 338 */ 333 339 @Override public void mouseReleased(MouseEvent e) { 340 if(!Main.map.mapView.isVisibleDrawableLayer()) 341 return; 342 334 343 if (mode == Mode.select) { 335 344 selectionManager.unregister(Main.map.mapView); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r1415 r1418 190 190 return activeLayer != null && activeLayer instanceof OsmDataLayer; 191 191 } 192 193 public Boolean isVisibleDrawableLayer() { 194 return isDrawableLayer() && activeLayer.visible; 195 } 196 192 197 193 198 /**
Note:
See TracChangeset
for help on using the changeset viewer.