Changeset 35916 in osm


Ignore:
Timestamp:
2022-02-09T19:35:36+01:00 (2 years ago)
Author:
taylor.smock
Message:

buildings_tools: fix #14213: "Rotate crosshair" forgets rotation after right-click drag

patch by Woazboat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java

    r35915 r35916  
    5555    private final Cursor cursorJoinNode;
    5656    private final Cursor cursorJoinWay;
    57     private Cursor currCursor;
    5857    private Cursor customCursor;
    5958
     
    8180                ImageProvider.getCursor("crosshair", null));
    8281
    83         currCursor = getCursor();
    8482        cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode");
    8583        cursorJoinWay = ImageProvider.getCursor("crosshair", "joinway");
     
    105103     */
    106104    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);
    122106    }
    123107
Note: See TracChangeset for help on using the changeset viewer.