#22623 closed enhancement (fixed)
[PATCH][RFC] BuildingTools: simpler mode switching
Reported by: | richlv | Owned by: | Upliner |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin buildings_tools | Version: | tested |
Keywords: | Cc: |
Description
BuildingTools/BuildingsTools plugin is activated by the "b" shortcut key.
Sometimes, I accidentally switch into the round building mode. As I never recall how to exit it, each time it's an internet search.
The opposite is true - I cannot recall how to switch _to_ the round building mode, thus I never use it.
Perhaps the plugin can be changed to work in a more discoverable way, that would also be more consistent with other JOSM features.
Similar as "a" switches between the angled/free mode, and "s" switches between rectangular/lasso select modes, "b" could switch between the rectangular and round buildings.
Attachments (3)
Change History (22)
comment:1 by , 2 years ago
follow-up: 3 comment:2 by , 2 years ago
What's the reasoning behind not liking that selection method?
It took a little while to get used to it when it was introduced, but now I find it pretty convenient.
Moving it all to menu entries does not seem feasible, as it would be at least 4 new entries for a/s modes only.
Thank you for mentioning the "Data" menu - it somehow did not occur to me that it would be hidden _there_.
I checked "Edit", "Tools" and tried all kinds of clicking on the building button in the vertical toolbar :)
comment:3 by , 2 years ago
Replying to richlv:
What's the reasoning behind not liking that selection method?
I think part of it is that there is a shortcut specifically for lasso mode, and they think there should be one specifically for box mode.
It took a little while to get used to it when it was introduced, but now I find it pretty convenient.
Moving it all to menu entries does not seem feasible, as it would be at least 4 new entries for a/s modes only.
Thank you for mentioning the "Data" menu - it somehow did not occur to me that it would be hidden _there_.
I checked "Edit", "Tools" and tried all kinds of clicking on the building button in the vertical toolbar :)
I'm tempted to move it to More Tools
(I think we have that as an option), which would make a lot more sense than Data
. But its been that way for <some long amount of time>, so I'm kind of leary about changing it.
I'll go ahead and throw together a quick patch for it. I cannot target it for a specific release (since it is a plugin), but hopefully those who care will see this ticket and give feedback...
by , 2 years ago
Attachment: | 22623.patch added |
---|
comment:5 by , 2 years ago
Summary: | BuildingTools: simpler mode switching → [PATCH][RFC] BuildingTools: simpler mode switching |
---|
comment:6 by , 2 years ago
Do not find the plugin under Plugins.
Maybe it would help to document the plugin on this wiki as the wiki pages work as internal help pages, too.
comment:7 by , 2 years ago
Replaced the jarfile in ~/Library/JOSM/plugins , but cannot get 'b' to change modes.
comment:8 by , 2 years ago
I think the patch only moves the menu entries from "Data" to "More tools", I see no code to change the shortcut.
follow-up: 12 comment:9 by , 2 years ago
Ah, I see - yes, the menu entry was moved, although my main concern is the inconsistent shortcut behaviour :)
comment:10 by , 2 years ago
That is funny -- it works for me.
Can you start JOSM from the command line, and look for anything that looks like
2023-01-09 05:55:11.602 INFO: Keystroke pressed B is already assigned to org.openstreetmap.josm.plugins.buildings_tools.DrawBuildingAction@a2341c6, will be overridden by org.openstreetmap.josm.plugins.buildings_tools.DrawBuildingAction@5163379c
Speaking of which, it looks like we should look into fixing that. It should still work (since it should be calling the same code, just in a different object).
comment:11 by , 2 years ago
I always struggle with figuring out / recalling how to run from the CLI with webstart...
But with the posted messages, does that mean the cause is known?
comment:12 by , 2 years ago
Replying to richlv:
Ah, I see - yes, the menu entry was moved, although my main concern is the inconsistent shortcut behaviour :)
I'm going to assume comment:11 is referring to this as the problem, for which you hope we know the cause.
No, I do not know why you are seeing inconsistent behavior with the modified buildings_tools
jar for the shortcut. You haven't changed the shortcut for the action, right?
comment:13 by , 2 years ago
Downloaded josm-tested.jar, just to be sure. No messages were printed.
For this action, no shortcuts have been changed.
To clarify, I do not see "b" switching between rectangular and circular buildings even with the test version of the plugin.
comment:14 by , 2 years ago
I've gone ahead and uploaded a rebuilt version of the plugin. Hopefully it was some kind of compile-time issue.
comment:15 by , 2 years ago
Wondering if there might be some misunderstanding still :)
Same behaviour with the latest custom plugin version.
By inconsistency I meant the original behaviour, where s/a shortcuts switch modes, b does not.
GerdP mentioned they do not see any changes to the shortcut code, maybe no behaviour change should be expected for now?
comment:16 by , 2 years ago
Yes, no behavior change should be expected for now.
This ticket has two problems
- The
buildings_tools
actions should be more discoverable- So they probably shouldn't be in the
Data
menu, which is what my patch currently fixes. I anticipate that there will be some confusion in the community, so we'll probably want to put it in the wiki:StartupPageSource to avoid getting bug reports about the moved actions. Even though it isn't a JOSM core change. - EDIT: This is what the current patch changes.
- So they probably shouldn't be in the
- "b" could switch between the rectangular and round buildings
- The patch doesn't do anything with this yet. It will be a bit more complicated, but still doable.
by , 2 years ago
Attachment: | 22623.2.patch added |
---|
Allow toggling between circle and rectangle modes (non-default behavior, requires user to change setting in Set buildings size
-> Advanced
)
by , 2 years ago
Attachment: | buildings_tools.jar added |
---|
comment:19 by , 20 months ago
@richlv: I won't be building a dist for it right now -- I want to give translators a chance to do some translating.
We actually have a ticket open from someone who doesn't like the fact that they can switch between rectangular/lasso select modes with
s
.Anyway,
Data
->Set building shape to <shape>
seems fairly obvious to me. It also shows the keyboard shortcut on the right (on Mac, and I think it should do the same for Windows/Linux).