Changeset 19723 in josm


Ignore:
Timestamp:
2026-12-01T09:10:20+01:00 (less than one hour 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
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.checkstyle

    r16050 r19723  
    11<?xml version="1.0" encoding="UTF-8"?>
    22
    3 <fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
     3<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
    44  <local-check-config name="JOSM" location="tools/checkstyle/josm_checks.xml" type="project" description="">
    55    <additional-data name="protect-config-file" value="false"/>
    66  </local-check-config>
    7   <fileset name="all" enabled="true" check-config-name="JOSM" local="true">
    8     <file-match-pattern match-pattern="." include-pattern="true"/>
     7  <local-check-config name="maven-checkstyle-plugin validate" location="file:/C:/josm/core/tools/checkstyle/josm_checks.xml" type="remote" description="maven-checkstyle-plugin configuration validate">
     8    <property name="checkstyle.header.file" value="D:\eclipse_workspace_new\.metadata\.plugins\org.eclipse.core.resources\.projects\josm\com.basistech.m2e.code.quality.checkstyleConfigurator\checkstyle-header-validate.txt"/>
     9    <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
     10  </local-check-config>
     11  <fileset name="java-sources-validate" enabled="true" check-config-name="maven-checkstyle-plugin validate" local="true">
     12    <file-match-pattern match-pattern="^test/unit/.*\.java" include-pattern="true"/>
     13    <file-match-pattern match-pattern="^src/.*\.java" include-pattern="true"/>
     14    <file-match-pattern match-pattern="^test/unit.*module-info\.java" include-pattern="false"/>
     15    <file-match-pattern match-pattern="^test/unit.*org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/.*\.java" include-pattern="false"/>
     16    <file-match-pattern match-pattern="^src.*module-info\.java" include-pattern="false"/>
     17    <file-match-pattern match-pattern="^src.*org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/.*\.java" include-pattern="false"/>
     18    <file-match-pattern match-pattern="^resources/.*\.properties" include-pattern="true"/>
     19    <file-match-pattern match-pattern="^.*\.properties" include-pattern="true"/>
     20    <file-match-pattern match-pattern="^test/data/.*\.properties" include-pattern="true"/>
    921  </fileset>
    1022  <filter name="DerivedFiles" enabled="true"/>
  • 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.