-
Notifications
You must be signed in to change notification settings - Fork 45
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
Select tool overhaul #295
Merged
Merged
Select tool overhaul #295
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adds soft inpainting
adds scheduler selector
updates hardcoded schedulers to API call for webUI 1.9.3
…nd broke my terrible impelementation ha ha ha
…d history desync when undoing with an active selection.
whoa :o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had some time to kill and went in to fix a few issues with the select tool, but wound up doing a minor overhaul, and figured someone else might find it useful. Mostly UI and adding controls. Other than applying the final transform, the core functionality is mostly unchanged.
While none of the other tools were in need of as much attention as select, I've made similar updates to a few of them. If y'all aren't willing to accept these sorts of changes, let me know, and I won't bother cleaning them up.
Changes:
Reset State in the Ctrl+A shortcuts so that the current selection isn't lost when the shortcuts are used with a transformed selection. Previously, if you selected a region, moved it, then hit Ctrl+A, the transformed selection was lost. (Might want to apply instead, but resetting seems like the safest option.)
Fix History State Desynchronization when undo/redo is called while a selection is active. For example, previously, moving a selection, calling an undo that removes the active layer, then cancelling the transform with R-click, would place the restored image in an inaccessible layer.
To do this, added onundo/onredo callbacks to the commands object in commands.js (Only major change outside of select.js). These are called before undoing/redoing, and provide a function that can be called to cancel the undo/redo.
Selection state is now reset before all undo/redo commands. Performing an undo with a transformed selection resets the selection and cancels the undo, unless going back multiple steps. So undo effectively undoes the current transformation.
Refactored how Transformation is applied to make it easier to add shortcuts and additional functionality.
Fixed the broken "Delete" hotkey that completely broke history.
Added a toggle to always move to a new layer when transforming a selection. (file-plus icon)
Added "Layer" buttons to the Save Selection/Save Visible buttons that copy selected content to a new layer. Reworked their UI a bit to fit everything.
Added a new row of buttons
Mouse Controls
Keyboard Shortcuts