Opened 4 years ago
Closed 4 years ago
#20564 closed defect (fixed)
[Patch] Buildings tool shows wrong cursor icon
Reported by: | Solarspot | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Plugin buildings_tools | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Prerequisite: change mode to rectangular buildings (
Alt+R
) and restart JOSM - Download map data
- Set buildings mode to round buildings (
Alt+Z
) - Switch to select mode (
S
) - Switch to buildings mode (
B
)
What is the expected result?
The mouse cursor should be the one for round buildings because that mode is currently selected
What happens instead?
The mouse cursor will be the one for rectangular buildings as long as the mouse is not moved. If a house is drawn, it will be a circular one (because that is the mode that is actually selected)
Please provide any additional information below. Attach a screenshot if possible.
See attached gif.
It seems that Josm memorizes the active rectangular/circular-mode from the last session and always shows the icon for that mode when the building mode is activated with B
.
It is quite frustrating to draw wrong shapes even though you were sure that you selected the right mode.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-12-28 22:03:23 +0100 (Mon, 28 Dec 2020) Revision:17428 Build-Date:2020-12-29 02:30:53 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17428 en) Windows 10 64-Bit OS Build number: Windows 10 Pro 1909 (18363) Memory Usage: 489 MB / 2048 MB (175 MB allocated, but free) Java version: 9.0.4+11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 2560×1440 (scaling 1,00×1,00) Maximum Screen Size: 2560×1440 Best cursor sizes: 16×16→32×32, 32×32→32×32 Dataset consistency test: No problems found Plugins: + FastDraw (35640) + ImproveOsm (203) + OpeningHoursEditor (35640) + QuickLabel (18) + RoadSigns (35640) + SimplifyArea (35640) + apache-commons (35524) + apache-http (35589) + buildings_tools (35669) + contourmerge (v0.1.6) + editgpx (35562) + imagery_offset_db (35640) + jaxb (35543) + jna (35662) + merge-overlap (35640) + pt_assistant (2.1.10-80-g7d9bba3) + rasterfilters (35648) + routes (35543) + tageditor (35640) + turnlanes-tagging (288) + turnrestrictions (35640) + undelete (35640) + utilsplugin2 (35691) + wikipedia (1.1.4) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/CommonKeyboardShortcuts&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/public_bookcase&zip=1 + %UserProfile%\Desktop\xmas.xml + https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Healthcare&zip=1 Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1 - https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip - https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1 - https://github.com/hotosm/HDM-JOSM-style/archive/master.zip - https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1 - %UserProfile%\Downloads\Styles_Coloured_buildings\Styles_Coloured_buildings-style.zip Validator rules: + https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1 + https://josm.openstreetmap.de/josmfile?page=Rules/MissingStreetnumberOrConscriptionnumber&zip=1 + https://josm.openstreetmap.de/josmfile?page=Rules/MissingWeekdays&zip=1 + https://www.openrailwaymap.org/validator/de-openrailwaymap.validator.mapcss + https://www.openrailwaymap.org/validator/openrailwaymap.validator.mapcss + https://raw.githubusercontent.com/OpenNauticalChart/josm/master/Seamark.validator.mapcss + https://raw.githubusercontent.com/stefan-a-bauer/josm-validators/master/mtb.validator.mapcss + https://github.com/Jungle-Bus/transport_mapcss/raw/master/transport.validator.zip Last errors/warnings: - 00003,632 W: Failed to scan file 'public_transport_layer.jar.new' for plugin information. Skipping. - 00004,099 W: Failed to install plugin '<josm.pref>\plugins\public_transport_layer.jar' from temporary download file '<josm.pref>\plugins\public_transport_layer.jar.new'. zip file is empty: java.util.zip.ZipException: zip file is empty - 00006,606 W: Failed to open file with extension 'mapcss' and namepart 'style' in zip file 'Styles_Coloured_buildings-style.zip'. Exception was: java.nio.file.NoSuchFileException: %UserProfile%\Downloads\Styles_Coloured_buildings\Styles_Coloured_buildings-style.zip: java.nio.file.NoSuchFileException: %UserProfile%\Downloads\Styles_Coloured_buildings\Styles_Coloured_buildings-style.zip - 00007,220 W: Failed to load Mappaint styles from '%UserProfile%\Downloads\Styles_Coloured_buildings\Styles_Coloured_buildings-style.zip'. Exception was: java.nio.file.NoSuchFileException: %UserProfile%\Downloads\Styles_Coloured_buildings\Styles_Coloured_buildings-style.zip - 00007,220 E: java.nio.file.NoSuchFileException: %UserProfile%\Downloads\Styles_Coloured_buildings\Styles_Coloured_buildings-style.zip - 00008,482 E: java.nio.file.NoSuchFileException: %UserProfile%\Desktop\xmas.xml - 00008,483 E: %UserProfile%\Desktop\xmas.xml - 00009,535 W: java.io.IOException: The requested URL https://github.com/Jungle-Bus/transport_mapcss/raw/master/transport.validator.zip was not found - 00009,646 W: Failed to add https://github.com/Jungle-Bus/transport_mapcss/raw/master/transport.validator.zip to tag checker - 00009,647 W: java.io.IOException: No file found for: https://github.com/Jungle-Bus/transport_mapcss/raw/master/transport.validator.zip
Attachments (4)
Change History (18)
by , 4 years ago
Attachment: | josb_buildings_tool.gif added |
---|
comment:1 by , 4 years ago
Version: | → tested |
---|
comment:2 by , 4 years ago
Version: | tested |
---|
by , 4 years ago
Attachment: | 20564.patch added |
---|
comment:5 by , 4 years ago
The problem was that building_tools has two distinct cursors but MapMode expects only one. Now the actual cursor is always set immediately after this MapMode is entered.
Also a null check prevented the cursor update just after Josm start. Moved it to where the null check is indeed needed.
Also removed the instance variable cursorCrosshair because I don't think it's doing anything.
comment:6 by , 4 years ago
The patch helps for your scenario, but when I simply switch between the two modes the cursor doesn't change until I move the mouse.
comment:7 by , 4 years ago
I did notice it too but I wanted to open another ticket for it. The cause is different and the fix will require a different solution.
comment:8 by , 4 years ago
Summary: | Buildings tool shows wrong cursor icon → [Patch] Buildings tool shows wrong cursor icon |
---|
comment:10 by , 4 years ago
Neu ticket: #20585
I will also look into it, but it seems much harder to fix.
by , 4 years ago
Attachment: | 20564_and_20585.patch added |
---|
by , 4 years ago
Attachment: | 20564_and_20585-simple.patch added |
---|
Hmm, if I got that right the changes for enum ConfigKey are just refactoring and not needed to fix the problems? I think we should not do both steps in one change. Please review my version.
comment:12 by , 4 years ago
Sorry, didn't notice your response until now.
Your version is all right.
comment:13 by , 4 years ago
Owner: | changed from | to
---|
version is only for tickets of core components.