-
Notifications
You must be signed in to change notification settings - Fork 115
Add new box zoom tool, icon and cursor. Hook it into existing GUI. #2360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thank you for the contribution.
The new action won't be in the mobile UI until we add it. You can switch to the mobile UI on the PC by enabling "Touch mode" on the welcome screen.
You might need to look at when to actual cancel the drag operation. Maybe as soon as another button is pressed. |
…gging, can now reintroduce disabled assertion. Convert files from CRLF to LF line endings.
@dg0yt thanks for the feedback.
That worked. However I have a hunch that screenspace on a tablet might be constrained, and I don't have a good feel if there is available space for this tool or not. What do you think? Also, should a shortcut key be assigned?
Thanks. My latest push uses the setEditingInProgress() during drag to prevent interference from the pie context menu, and restores the assertion in tool_base.h. That seemed like the most straightforward way. |
Maybe it is not necessary to add it to the mobile UI (now) because it has an alternative: Use two fingers. |
@elektronisk: thank you for your PR, I like the feature. SometimesNotVisible.mp4 |
@dl3sdo Thanks for testing it out. The last commit fixes this. |
@elektronisk: Tests are now successful, thank you for the fix. I notice that the zoom tool remains active until the user selects another tool. |
It can make sense to have a hierarchy of tool categories, Edit tools, Draw tools and View tools, where you fall back towards last used draw tool or edit tool when you "leave" the current tool. Using Esc is pretty reasonable for that purpose. It's a more involved change though, affects every tool and deserves separate issue IMO. |
Map editor: allow tool change from Box zoom tool, when symbol is selected in symbol widget.
@dl3sdo i did discover functionality for quickly entering draw tool based on selecting a symbol in the symbol widget. The last commit adds this "shortcut" so that it works from this Box zoom tool also. |
Fixes #229 .
This works fine for me on windows, but I'm unable to test it on tablet.
Note: the assertion in tool_base.cpp is commented because the assertion could be triggered by starting a drag operation (holding left mouse button), then clicking the right mouse button to bring up the pie context menu, and then letting go of the left mouse button, and starting a new drag. I'm not sure what the best way is to deal with the situation. Should I be disabling the pie context menu?
Screen.Recording.2025-04-07.204908.mp4