Index: /trunk/.checkstyle
===================================================================
--- /trunk/.checkstyle	(revision 19722)
+++ /trunk/.checkstyle	(revision 19723)
@@ -1,10 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
   <local-check-config name="JOSM" location="tools/checkstyle/josm_checks.xml" type="project" description="">
     <additional-data name="protect-config-file" value="false"/>
   </local-check-config>
-  <fileset name="all" enabled="true" check-config-name="JOSM" local="true">
-    <file-match-pattern match-pattern="." include-pattern="true"/>
+  <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">
+    <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"/>
+    <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
+  </local-check-config>
+  <fileset name="java-sources-validate" enabled="true" check-config-name="maven-checkstyle-plugin validate" local="true">
+    <file-match-pattern match-pattern="^test/unit/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^test/unit.*module-info\.java" include-pattern="false"/>
+    <file-match-pattern match-pattern="^test/unit.*org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/.*\.java" include-pattern="false"/>
+    <file-match-pattern match-pattern="^src.*module-info\.java" include-pattern="false"/>
+    <file-match-pattern match-pattern="^src.*org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/.*\.java" include-pattern="false"/>
+    <file-match-pattern match-pattern="^resources/.*\.properties" include-pattern="true"/>
+    <file-match-pattern match-pattern="^.*\.properties" include-pattern="true"/>
+    <file-match-pattern match-pattern="^test/data/.*\.properties" include-pattern="true"/>
   </fileset>
   <filter name="DerivedFiles" enabled="true"/>
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 19722)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 19723)
@@ -152,4 +152,6 @@
     private boolean drawTargetHighlight;
     private boolean didMouseDrag;
+    private boolean selectionInProgress;
+
     /**
      * The component this SelectAction is associated with.
@@ -281,4 +283,10 @@
         determineMapMode(c.isPresent());
 
+        // fix #25146: don't draw selection rectangle when not in selection mode
+        if (selectionInProgress && mode != Mode.SELECT) {
+            selectionInProgress = false;
+            selectionManager.unregister(mv);
+        }
+
         virtualManager.clear();
         if (mode == Mode.MOVE && !dragInProgress() && virtualManager.activateVirtualNodeNearPoint(e.getPoint())) {
@@ -472,4 +480,5 @@
                 selectionManager.register(mv, lassoMode);
                 selectionManager.mousePressed(e);
+                selectionInProgress = true;
                 break;
             }
