-
Notifications
You must be signed in to change notification settings - Fork 432
TAStudio: better axis editing #4583
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
9020d5f to
284935b
Compare
| { | ||
| Debug.Assert(false, $"{nameof(CellList)}'s distinctness invariant was almost broken! CellList.Add({(item is null ? "null" : item.ToString())})"); | ||
| // We can end up adding cells that are already selected pretty easily, by combining Alt multi-selection with Shift range-selection. | ||
| // System.Diagnostics.Debug.Assert(false, $"{nameof(CellList)}'s distinctness invariant was almost broken! CellList.Add({(item is null ? "null" : item.ToString())})"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
Fix the offending selection code. The usual selection actions respect the invariant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The offending selection code would, if "fixed", simply check if the cell was already selected prior to selecting it. There is no other way to do it. That doesn't seem any better, and I don't see any reason to but that burden on users of InputRoll or CellList. In terms of performance, that could easily be worse since users of InputRoll aren't going to perform that check with a binary search.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And to be clear, this change isn't related to axis editing. But I wanted it to stop nagging me while I was testing things.
|
When testing Doom I realized I need a way to change the sign with a simple command/key. Currently that's inconsistent (tested on this PR): right after entering analog edit mode if you type minus, it will erase the numeric value and put the minus; but after you've also typed the numeric value, hitting minus will instead remove/add the sign. Also now there's no way to keep changing the numeric value after you've typed all the available digits by typing more: you have to increment/decrement via other keys. Which means if you have autorestore on and you wanna find the optional value without leaving the edit mode, you can't type in arbitrary values repeatedly, only increment them via keys (mouse drag exits edit mode so it's not helpful either). Also exiting analog edit mode after every drag-edit feels clunky because sometimes you wanna keep editing and seeing the results, or you simply can't drag far enough to get the value you need in one go, and double-clicking again every time makes it more annoying. I tried looking at that code but it was quite complicated to make it not exit the edit mode without breaking other things. |
I think this needs its own hotkey, then. If pressing minus right after entering axis editing mode flipped the sign, that would be inconsistent with the behavior of letting users type in a new value without backspacing the old one. If a user wants to type in 2, they'd double click then press '2'. If they want to type in -2, they'd need to double click, backspace (potentially multiple times), then press '-' and '2'. (Edit: I suppose they could, instead of backspacing, type '2' and THEN press minus. But I think that is generally a worse user experience.)
I don't understand what you mean with this. There's never a need to use the increment/decrement hotkeys, or to leave edit mode: you can always backspace and type in a new digit. Perhaps it would be useful to make it so that typing a new digit replaces the last one ('105' -> type '6' -> '106'), but the old behavior of deleting everything was extremely annoying, and confusing, in my experience.
That's just the way it's always been. I can make it so that releasing the mouse button never exits edit mode. |
Oh I forgot!
I think that'd be good! |
284935b to
0771267
Compare
|
New commit makes it so releasing left mouse never exits axis edit mode. |
Check if completed: