#22814 closed defect (fixed)
[Patch] Command stack shows "Set 1 tags for 0 objects"
Reported by: | GerdP | Owned by: | GerdP |
---|---|---|---|
Priority: | normal | Milestone: | 24.02 |
Component: | Core | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- in the tags/membership dialog, double click on a property of an object, e.g. natural=tree
- click OK
What is the expected result?
nothing changes on the command stack since nothing was changed. I would also accept an entry "Set 0 tags for 1 object" which then allows to select the object.
What happens instead?
A new entry on the command stack "Set 1 tags for 0 objects" which doesn't seem to know the object that was not modified.
Please provide any additional information below. Attach a screenshot if possible.
I am often double checking the tags for guideposts which I've mapped recently since this is a very error prone task. So, my command stack is full of those useless entries.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-03-01 15:17:42 +0100 (Wed, 01 Mar 2023) Revision:18678 Build-Date:2023-03-02 02:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18678 en) Windows 10 64-Bit OS Build number: Windows 10 Home 2009 (19045) Memory Usage: 1970 MB / 1972 MB (725 MB allocated, but free) Java version: 17.0.4+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (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: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: en_DE Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=1.5.18531, --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\HWConsole.exe] Dataset consistency test: No problems found Plugins: + OpeningHoursEditor (35924) + RoadSigns (36038) + apache-commons (36034) + buildings_tools (36011) + contourmerge (v0.1.9) + ejml (35924) + geotools (36028) + jackson (36034) + jaxb (35952) + jts (36004) + o5m (35893) + opendata (36025) + pbf (36034) + poly (35976) + reltoolbox (35976) + reverter (36043) + undelete (36011) + utilsplugin2 (36011) Validator rules: + c:\josm\core\resources\data\validator\combinations.mapcss + c:\josm\core\resources\data\validator\geometry.mapcss + c:\josm\core\resources\data\validator\unnecessary.mapcss + d:\java_tools\JOSM\mygeometry.mapcss + https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1 Last errors/warnings: - 00000.633 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF' - 00000.635 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF' - 00001.086 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available - 73537.402 E: java.io.FileNotFoundException: F:\osm\bilder\2022-12-20\DSC_3010.JPG (Das System kann die angegebene Datei nicht finden) - 73574.689 E: java.io.FileNotFoundException: F:\osm\bilder\2022-12-20\DSC_3010.JPG (Das System kann die angegebene Datei nicht finden) - 73577.826 E: java.io.FileNotFoundException: F:\osm\bilder\2022-12-20\DSC_3010.JPG (Das System kann die angegebene Datei nicht finden) - 79137.226 E: java.io.FileNotFoundException: F:\osm\bilder\2023-01-03\DSC_2771.JPG (Das System kann die angegebene Datei nicht finden) - 105084.428 E: java.io.FileNotFoundException: F:\osm\bilder\2023-03-03\DSC_0456.JPG (Das System kann die angegebene Datei nicht finden)
Attachments (1)
Change History (7)
by , 12 months ago
Attachment: | 22814.patch added |
---|
comment:1 by , 12 months ago
Milestone: | → 24.02 |
---|---|
Owner: | changed from | to
Summary: | Command stack shows "Set 1 tags for 0 objects" → [Patch] Command stack shows "Set 1 tags for 0 objects" |
The patch also works for the case that the key was double clicked and nothing was changed before clicking OK.
If I hear no complains I'll commit this tomorrow.
comment:3 by , 9 months ago
Actually... I would like to use this "bug" to "copy" tags from existing features to new drawn ones.
Is there any other ways to do this?
comment:4 by , 9 months ago
Not sure what you mean. With utilsplugin2 installed you can use the shortcut Shift+R for "Paste tags from previous selection".
Does that help?
comment:5 by , 9 months ago
Thanks for your suggestion. I know this but it doesn't deal with the problem well.
I mean for example I have downloaded some ways, which contain many tags (key-value combos), and now I want to draw a new way. For this new way, I want to copy some tags from previous ways that has already loaded in JOSM. Using Shift+R would apply all tags from previous selection but in many cases I don't need all the tags.
Also, when I add some tags for the new way firstly and then use this shortcut, if there are tags with the same keys in the "previous selection", the value of duplicated tags I added to the new way would be covered.
I also knew I can use Ctrl+C and Ctrl+V directly, but the clipboard in the Windows system is very easy to be covered.
It is not convenient for... at least me.
I used this "bug" to add the tags, which I want to copy, to the "clipboard in JOSM", or the "recentTags.add(new Tag(key, value));" in "src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java" (line 612). But after this ticket's change, this line would be reached in the case that "the key was double clicked and nothing was changed before clicking OK".
I don't mean your changes is not good, because it is a bug that Command stack shows "Set 1 tags for 0 objects". I am not sure if there is another way to copy tags conveniently.
Maybe we can add recentTags even if there is no change but it is probably too selfish.
comment:6 by , 9 months ago
You can also select the tags that you want to copy and then select "Copy selected x Keys/Values" in the right click menu. If that also doesn't help please open a new ticket and try to describe step by step what you want to do, best with an example because.
Maybe use an older version and describe exactly how it worked before this bug was fixed.
add check to avoid a no-change-command on the undo/redo stack