Changeset 12630 in josm for trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
- Timestamp:
- 2017-08-24T00:15:51+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
r12620 r12630 10 10 import java.util.Map; 11 11 12 import org.openstreetmap.josm.Main;13 12 import org.openstreetmap.josm.data.coor.LatLon; 14 13 import org.openstreetmap.josm.data.notes.Note; … … 16 15 import org.openstreetmap.josm.data.notes.NoteComment; 17 16 import org.openstreetmap.josm.gui.JosmUserIdentityManager; 17 import org.openstreetmap.josm.gui.MainApplication; 18 import org.openstreetmap.josm.gui.MapFrame; 18 19 import org.openstreetmap.josm.tools.ListenerList; 19 20 import org.openstreetmap.josm.tools.Logging; … … 85 86 } 86 87 87 /** Returns the currently selected note 88 /** 89 * Returns the currently selected note 88 90 * @return currently selected note 89 91 */ … … 92 94 } 93 95 94 /** Set a selected note. Causes the dialog to select the note and 96 /** 97 * Set a selected note. Causes the dialog to select the note and 95 98 * the note layer to draw the selected note's comments. 96 99 * @param note Selected note. Null indicates no selection … … 98 101 public void setSelectedNote(Note note) { 99 102 selectedNote = note; 100 if (Main.map != null) { 101 Main.map.noteDialog.selectionChanged(); 103 MapFrame map = MainApplication.getMap(); 104 if (map != null) { 105 map.noteDialog.selectionChanged(); 102 106 } 103 107 listeners.fireEvent(l -> l.selectedNoteChanged(this)); … … 232 236 233 237 private void dataUpdated() { 234 if (Main.isDisplayingMapView()) { 235 Main .map.noteDialog.setNotes(getSortedNotes());238 if (MainApplication.isDisplayingMapView()) { 239 MainApplication.getMap().noteDialog.setNotes(getSortedNotes()); 236 240 } 237 241 listeners.fireEvent(l -> l.noteDataUpdated(this));
Note:
See TracChangeset
for help on using the changeset viewer.