Changeset 15385 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-09-29T00:05:29+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
r14877 r15385 14 14 import java.util.Collection; 15 15 import java.util.List; 16 import java.util.Objects; 16 17 17 18 import javax.swing.AbstractAction; … … 155 156 public void layerRemoving(LayerRemoveEvent e) { 156 157 if (e.getRemovedLayer() instanceof NoteLayer) { 157 noteData.removeNoteDataUpdateListener(this); 158 noteData = null; 159 model.clearData(); 160 MapFrame map = MainApplication.getMap(); 161 if (map.mapMode instanceof AddNoteAction) { 162 map.selectMapMode(map.mapModeSelect); 158 NoteData removedNoteData = ((NoteLayer) e.getRemovedLayer()).getNoteData(); 159 removedNoteData.removeNoteDataUpdateListener(this); 160 if (Objects.equals(noteData, removedNoteData)) { 161 noteData = null; 162 model.clearData(); 163 MapFrame map = MainApplication.getMap(); 164 if (map.mapMode instanceof AddNoteAction) { 165 map.selectMapMode(map.mapModeSelect); 166 } 163 167 } 164 168 }
Note:
See TracChangeset
for help on using the changeset viewer.