Changeset 12630 in josm for trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
- Timestamp:
- 2017-08-24T00:15:51+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r12620 r12630 32 32 import org.openstreetmap.josm.data.osm.NoteData.NoteDataUpdateListener; 33 33 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 34 import org.openstreetmap.josm.gui.MainApplication; 34 35 import org.openstreetmap.josm.gui.MapView; 35 36 import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils; … … 73 74 @Override 74 75 public void hookUpMapView() { 75 Main .map.mapView.addMouseListener(this);76 MainApplication.getMap().mapView.addMouseListener(this); 76 77 } 77 78 78 79 @Override 79 80 public synchronized void destroy() { 80 Main .map.mapView.removeMouseListener(this);81 MainApplication.getMap().mapView.removeMouseListener(this); 81 82 noteData.removeNoteDataUpdateListener(this); 82 83 super.destroy(); … … 134 135 int width = icon.getIconWidth(); 135 136 int height = icon.getIconHeight(); 136 g.drawImage(icon.getImage(), p.x - (width / 2), p.y - height, Main .map.mapView);137 g.drawImage(icon.getImage(), p.x - (width / 2), p.y - height, MainApplication.getMap().mapView); 137 138 } 138 139 if (noteData.getSelectedNote() != null) { … … 260 261 Note closestNote = null; 261 262 for (Note note : noteData.getNotes()) { 262 Point notePoint = Main .map.mapView.getPoint(note.getLatLon());263 Point notePoint = MainApplication.getMap().mapView.getPoint(note.getLatLon()); 263 264 //move the note point to the center of the icon where users are most likely to click when selecting 264 265 notePoint.setLocation(notePoint.getX(), notePoint.getY() - iconHeight / 2);
Note:
See TracChangeset
for help on using the changeset viewer.