chaiNNer icon indicating copy to clipboard operation
chaiNNer copied to clipboard

Undo gets "stuck" in text boxes

Open Kim2091 opened this issue 2 years ago • 5 comments

Occasionally while using CTRL+Z to undo actions, it will continuously undo text edits within a node (such as the Resize (Factor) node) rather than actually undo node arrangements or modifications.

Kim2091 avatar Jul 30 '22 21:07 Kim2091

So I just implemented the fix and I think it's worse. The problem is that you can now undo text edits (basically, it'll uses Chainner's undo and will undo whatever text you just typed + the change before that), but you can't redo it. Since the text edit wasn't committed to history as a change, it can be redone.

RunDevelopment avatar Aug 17 '22 09:08 RunDevelopment

I made a PR, so feel free to check it out and see for yourself whether it's better. #745

RunDevelopment avatar Aug 17 '22 09:08 RunDevelopment

In my case, that fix would absolutely be of use. I'm not sure it'd benefit the majority of users though, for the reasons you stated.

Kim2091 avatar Aug 27 '22 03:08 Kim2091

@joeyballentine @kimberly990 Can we close this issue now? I just closed the fix PR. As I said before, I think the fix (as in, the behavior desired by this issue) is worse than what we currently have.

RunDevelopment avatar Sep 14 '22 20:09 RunDevelopment

While I agree the existing fix should be closed, this is an ongoing issue. It basically makes the undo function useless if you've avoided editing any text boxes.

If you believe there are no alternative solutions, then I agree this should be closed.

Kim2091 avatar Sep 14 '22 21:09 Kim2091

Can I ask why it seems the fix is "worse".

Currently if you edit a textbox, then move the node, then undo to put the node back, it'll also undo the textbox, this seems insane to me? This doesn't happen in blender, or unreal or any other graph node system I've used... It counts a "move" as a separate history action in all other programs but not Chainner...

This has been causing me huge headache when random input fields keep resetting because I undo a movement.

Or is what I described a separate issue?

vekien avatar Aug 05 '23 12:08 vekien

We can probably revisit this soon. I think we have a few issues with undo that are mostly just caused by how we store our state. If we redid that, we could probably fix multiple issues

joeyballentine avatar Aug 05 '23 14:08 joeyballentine