- Timestamp:
- 2013-10-27T03:20:19+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r6316 r6333 363 363 if (map != null) { 364 364 map.mapView.removeLayer(layer); 365 if (map.mapView.getAllLayers().isEmpty()) { 365 if (isDisplayingMapView() && map.mapView.getAllLayers().isEmpty()) { 366 366 setMapFrame(null); 367 367 } -
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r6289 r6333 261 261 setEnabled(getCurrentDataSet() != null && ! getCurrentDataSet().getSelected().isEmpty()); 262 262 } else if ("layer".equals(mode)) { 263 if ( Main.map == null || Main.map.mapView == null|| Main.map.mapView.getAllLayersAsList().isEmpty()) {263 if (!Main.isDisplayingMapView() || Main.map.mapView.getAllLayersAsList().isEmpty()) { 264 264 setEnabled(false); 265 265 } else { -
trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java
r5799 r6333 39 39 public static Set<RelationMember> getMembersForCurrentSelection(Relation r) { 40 40 Set<RelationMember> members = new HashSet<RelationMember>(); 41 if (Main. map != null && Main.map.mapView != null) {41 if (Main.isDisplayingMapView()) { 42 42 OsmDataLayer editLayer = Main.map.mapView.getEditLayer(); 43 43 if (editLayer != null && editLayer.data != null) { -
trunk/src/org/openstreetmap/josm/command/Command.java
r6173 r6333 86 86 */ 87 87 public Command() { 88 this.layer = Main. map != null && Main.map.mapView != null? Main.map.mapView.getEditLayer() : null;88 this.layer = Main.isDisplayingMapView() ? Main.map.mapView.getEditLayer() : null; 89 89 } 90 90 -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r6316 r6333 407 407 } 408 408 // repaint to make sure new data is displayed properly. 409 if (Main. map != null && Main.map.mapView != null) {409 if (Main.isDisplayingMapView()) { 410 410 Main.map.mapView.repaint(); 411 411 } -
trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java
r6070 r6333 156 156 @Override 157 157 public void layerRemoved(Layer oldLayer) { 158 if (oldLayer instanceof OsmDataLayer && Main. map != null&& Main.map.mapView.getEditLayer() == null) {158 if (oldLayer instanceof OsmDataLayer && Main.isDisplayingMapView() && Main.map.mapView.getEditLayer() == null) { 159 159 Main.main.removeLayer(this); 160 160 } else if (oldLayer == this) { -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r6313 r6333 604 604 if (request.getState() != null && !request.isPrecacheOnly()) { 605 605 finishedRequests.add(request); 606 if (Main. map != null && Main.map.mapView != null) {606 if (Main.isDisplayingMapView()) { 607 607 Main.map.mapView.repaint(); 608 608 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
r6316 r6333 84 84 Node nd = null; 85 85 86 if (Main. map != null && Main.map.mapView != null) {86 if (Main.isDisplayingMapView()) { 87 87 Point p = Main.map.mapView.getPoint(ll); 88 88 nd = Main.map.mapView.getNearestNode(p, OsmPrimitive.isUsablePredicate); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r6316 r6333 115 115 Node nd = null; 116 116 117 if (Main. map != null && Main.map.mapView != null) {117 if (Main.isDisplayingMapView()) { 118 118 Point p = Main.map.mapView.getPoint(ll); 119 119 nd = Main.map.mapView.getNearestNode(p, OsmPrimitive.isUsablePredicate);
Note:
See TracChangeset
for help on using the changeset viewer.