- Timestamp:
- 2015-08-07T21:02:00+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r8642 r8646 417 417 } 418 418 419 fireLayerAdded(layer);420 419 if (isOsmDataLayer) { 421 420 ((OsmDataLayer) layer).addLayerStateChangeListener(this); 422 421 } 423 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire); 422 424 423 layer.addPropertyChangeListener(this); 425 424 Main.addProjectionChangeListener(layer); 426 425 AudioPlayer.reset(); 427 426 } 427 fireLayerAdded(layer); 428 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire); 429 428 430 if (!listenersToFire.isEmpty()) { 429 431 repaint(); … … 518 520 layers.remove(layer); 519 521 Main.removeProjectionChangeListener(layer); 520 521 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire);522 fireLayerRemoved(layer);523 522 layer.removePropertyChangeListener(this); 524 523 layer.destroy(); 525 524 AudioPlayer.reset(); 526 525 } 526 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire); 527 fireLayerRemoved(layer); 528 527 529 repaint(); 528 530 } … … 576 578 } 577 579 listenersToFire = setEditLayer(layers); 578 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire);579 580 AudioPlayer.reset(); 580 581 } 582 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire); 583 581 584 repaint(); 582 585 } … … 922 925 public void setActiveLayer(Layer layer) { 923 926 EnumSet<LayerListenerType> listenersToFire; 924 925 synchronized (layers) { 926 Layer oldActiveLayer = activeLayer; 927 OsmDataLayer oldEditLayer = editLayer; 927 Layer oldActiveLayer; 928 OsmDataLayer oldEditLayer; 929 930 synchronized (layers) { 931 oldActiveLayer = activeLayer; 932 oldEditLayer = editLayer; 928 933 listenersToFire = setActiveLayer(layer, true); 929 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire); 930 } 934 } 935 onActiveEditLayerChanged(oldActiveLayer, oldEditLayer, listenersToFire); 936 931 937 repaint(); 932 938 }
Note:
See TracChangeset
for help on using the changeset viewer.