Changeset 35916 in osm for applications/editors/josm
- Timestamp:
- 2022-02-09T19:35:36+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java
r35915 r35916 55 55 private final Cursor cursorJoinNode; 56 56 private final Cursor cursorJoinWay; 57 private Cursor currCursor;58 57 private Cursor customCursor; 59 58 … … 81 80 ImageProvider.getCursor("crosshair", null)); 82 81 83 currCursor = getCursor();84 82 cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode"); 85 83 cursorJoinWay = ImageProvider.getCursor("crosshair", "joinway"); … … 105 103 */ 106 104 private void setCursor(final Cursor c) { 107 if (currCursor.equals(c)) 108 return; 109 try { 110 // We invoke this to prevent strange things from happening 111 EventQueue.invokeLater(() -> { 112 MapFrame map = MainApplication.getMap(); 113 // Don't change cursor when mode has changed already 114 if (map == null || !(map.mapMode instanceof DrawBuildingAction)) 115 return; 116 map.mapView.setCursor(c); 117 }); 118 currCursor = c; 119 } catch (Exception e) { 120 Logging.error(e); 121 } 105 MainApplication.getMap().mapView.setNewCursor(c, this); 122 106 } 123 107
Note:
See TracChangeset
for help on using the changeset viewer.