Changeset 19723 in josm for trunk/src/org


Ignore:
Timestamp:
2026-12-01T09:10:20+01:00 (36 hours ago)
Author:
GerdP
Message:

fix #25146: Selection rectangle is drawn while rotating or scaling

  • add code to unregister the SelectionManager when selection mode was ended
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r19701 r19723  
    152152    private boolean drawTargetHighlight;
    153153    private boolean didMouseDrag;
     154    private boolean selectionInProgress;
     155
    154156    /**
    155157     * The component this SelectAction is associated with.
    … …  
    281283        determineMapMode(c.isPresent());
    282284
     285        // fix #25146: don't draw selection rectangle when not in selection mode
     286        if (selectionInProgress && mode != Mode.SELECT) {
     287            selectionInProgress = false;
     288            selectionManager.unregister(mv);
     289        }
     290
    283291        virtualManager.clear();
    284292        if (mode == Mode.MOVE && !dragInProgress() && virtualManager.activateVirtualNodeNearPoint(e.getPoint())) {
    … …  
    472480                selectionManager.register(mv, lassoMode);
    473481                selectionManager.mousePressed(e);
     482                selectionInProgress = true;
    474483                break;
    475484            }
Note: See TracChangeset for help on using the changeset viewer.