- Timestamp:
- 2012-08-15T17:11:43+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r5152 r5448 627 627 } 628 628 } 629 if (!modeChanged && mapMode != null) { 630 // Let mapmodes know about new active layer 631 mapMode.exitMode(); 632 mapMode.enterMode(); 633 } 634 // invalidate repaint cache 635 Main.map.mapView.preferenceChanged(null); 629 // if this is really a change (and not the first active layer) 630 if (oldLayer != null) { 631 if (!modeChanged && mapMode != null) { 632 // Let mapmodes know about new active layer 633 mapMode.exitMode(); 634 mapMode.enterMode(); 635 } 636 // invalidate repaint cache 637 Main.map.mapView.preferenceChanged(null); 638 } 636 639 637 640 // After all listeners notice new layer, some buttons will be disabled/enabled -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r5407 r5448 319 319 } 320 320 fireLayerAdded(layer); 321 if (layer instanceof OsmDataLayer || activeLayer == null) { 321 boolean callSetActiveLayer = layer instanceof OsmDataLayer || activeLayer == null; 322 if (callSetActiveLayer) { 322 323 // autoselect the new layer 323 setActiveLayer(layer); 324 setActiveLayer(layer); // also repaints this MapView 324 325 } 325 326 layer.addPropertyChangeListener(this); 326 327 Main.addProjectionChangeListener(layer); 327 328 AudioPlayer.reset(); 328 repaint(); 329 if (!callSetActiveLayer) { 330 repaint(); 331 } 329 332 } 330 333
Note:
See TracChangeset
for help on using the changeset viewer.