Opened 40 hours ago
Last modified 6 hours ago
#24703 new defect
Moving filtered objects fails
| Reported by: | GerdP | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- load attached file
- add a filter
building=* addr - search for building=* with enabled "all objects" checkbox, this should select 3 buildings
- press and hold CTRL and drag the selection by e.g. 10m
What is the expected result?
Not sure. Either all three buildings are moved by the same amount or only the two buildings which are not partly hidden.
What happens instead?
All three buildings are moved, but the filtered one is only moved a little bit. Two move commands are on the command stack, first for 15 nodes, second for 10 nodes.
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2026-03-28 20:28:41 +0100 (Sat, 28 Mar 2026) Revision:19555 Build-Date:2026-03-29 01:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (19555 en) Windows 11 64-Bit OS Build number: Windows 10 Pro 25H2 (26200) Memory Usage: 412 MB / 6144 MB (189 MB allocated, but free) Java version: 21.0.2+13-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.00×1.00) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: Cp1252 Locale info: en_DE Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=1.5.19039, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM HWConsole.exe] Dataset consistency test: No problems found Plugins: + OpeningHoursEditor (36474) + apache-commons (36474) + buildings_tools (36474) + comfort0 (36474) + ejml (36474) + geotools (36474) + jackson (36474) + jaxb (36474) + jts (36474) + o5m (36474) + opendata (36474) + pbf (36474) + photo_geotagging (36474) + poly (36474) + reverter (36474) + terracer (36484) + undelete (36474) + utilsplugin2 (36497) Tagging presets: + c:\josm\core\resources\data\defaultpresets.xml Map paint styles: + c:\josm\core\resources\styles\standard\elemstyles.mapcss Validator rules: + d:\java_tools\JOSM\mygeometry.mapcss + https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1 + c:\josm\core\resources\data\validator\combinations.mapcss + c:\josm\core\resources\data\validator\geometry.mapcss Last errors/warnings: - 00129.200 W: java.io.IOException: Attribution is not loaded yet - 00129.200 W: java.io.IOException: Attribution is not loaded yet - 00129.201 W: java.io.IOException: Attribution is not loaded yet - 00129.201 W: java.io.IOException: Attribution is not loaded yet - 00129.201 W: java.io.IOException: Attribution is not loaded yet - 00129.202 W: java.io.IOException: Attribution is not loaded yet - 00129.203 W: java.io.IOException: Attribution is not loaded yet - 00129.203 W: java.io.IOException: Attribution is not loaded yet - 00129.204 W: java.io.IOException: Attribution is not loaded yet - 00129.205 W: java.io.IOException: Attribution is not loaded yet
Attachments (1)
Change History (9)
by , 40 hours ago
comment:1 by , 36 hours ago
comment:4 by , 35 hours ago
I fear 3) doesn't work :(
The check has to be performed when the first drag is noticed, and then you can only abort.
comment:6 by , 35 hours ago
Yes. My current approach simply shows a notification that the intended action was aborted when the selection contains ways which are disabled. Disabled nodes seem to be harmless.
Something like this in updateCommandWhileDragging()
if ((mode == Mode.MOVE || mode == Mode.ROTATE || mode == Mode.SCALE) && ds.getSelectedWays().stream().anyMatch(Way::isDisabled)) { new Notification(tr("Action aborted. The selection contains ways that are hidden by filters")) .setIcon(JOptionPane.WARNING_MESSAGE).show(); return false; }
comment:7 by , 20 hours ago
Maybe the better alternative would be to disallow the selection of hidden objects using search (and whatever else allows this).
For example, there is no warning when I delete them, I can also add or change tags. The latter is quite dangerous because the selection is again modified after that.
I rarely use filters, so I don't know what users might expect. For sure I didn't expect that the usage of a filter may change the selection, I always thought it is only about rendering.
comment:8 by , 6 hours ago
I think it should not be possible to move any filtered (i.e. invisible) objects.



Same problem also with Rotate or Scale action. The selection is changed when
FilterModel.executeFilters()is called and this routine is called when the data is changed.I see only two different ways to handle this. If user tries to move, scale or rotate a selection which contains hidden objects,
1) change nothing and show a warning that JOSM is unable to execute the action with this selection
2) execute the action only for the unhidden objects