Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Selection modes #798

Merged
merged 10 commits into from
Dec 31, 2022
Merged

Conversation

Variable-ind
Copy link
Contributor

  1. Removed HSeparators from tool headers
  2. Added Selection modes:
  • 4 modes Default (that obeys shortcuts)
  • Other 3 don't obey shortcuts and will lock a specific mode (handy when we need to do adding over and over, and so on)

Preview:

Demo.mp4

this is required because this is "Paint" Selection
(so it's not supposed to cancel selection if we click outside the canvas)
Default, Add, Subtract, Intersect
@OverloadedOrama
Copy link
Member

I'm testing it and overall it works okay, but there is some inconsistency regarding the shortcuts. When "Always Add" is selected and Control is being held, it's subtracting, and intersecting with Shift+Control, which I think should be the desirable behavior. But when "Always Subtract" is selected, it ignores the add and intersect shortcuts. Similarly, "Always Intersect" seems to ignore the add shortcut, but not the subtract shortcut.

I think it should behave like in GIMP, where holding a shortcut should always change the mode, and have it reflect on the UI as well. So, for example, if "Always Subtract" is selected but the user holds Shift to add, the mode should change to "Always Add" (the OptionButton should change as well), and return to "Always Subtract" when Shift is released. Perhaps we should also use icons instead of an OptionButton, like GIMP does, but this can change after the PR is merged.

image
Screenshot from GIMP.

@Variable-ind
Copy link
Contributor Author

I'm testing it and overall it works okay, but there is some inconsistency regarding the shortcuts. When "Always Add" is selected and Control is being held, it's subtracting, and intersecting with Shift+Control, which I think should be the desirable behavior. But when "Always Subtract" is selected, it ignores the add and intersect shortcuts. Similarly, "Always Intersect" seems to ignore the add shortcut, but not the subtract shortcut.

Okay i resolved the shortcut conflicts 👍

(the OptionButton should change as well)

but i didn't know of a way to do this so i left it for you 😃 (though personally i don't think this is a good idea because there also exists the "Default" option.)

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, looks good to me. Thank you!

@OverloadedOrama OverloadedOrama merged commit cbeef73 into Orama-Interactive:master Dec 31, 2022
@Variable-ind Variable-ind deleted the Selection_Modes branch January 4, 2023 12:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants