Skip to content
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

Undo/Redo weirdness #1866

Open
tmhglnd opened this issue Sep 25, 2024 · 11 comments
Open

Undo/Redo weirdness #1866

tmhglnd opened this issue Sep 25, 2024 · 11 comments
Labels
bug Something isn't working gui

Comments

@tmhglnd
Copy link

tmhglnd commented Sep 25, 2024

I'm encountering some strange behaviour when undo-ing / redo-ing during patching.

For example:

  1. Sometimes not all objects are moved back when multiple are selected, I move them, but then decide to undo the move. Some objects stick around. Below is illustrated what happens to me when using undo after a drag of multiple objects. At some point plugData really has no idea anymore where objects came from. Also if I decide to move a single object all of a sudden but undo that.

ScreenRecording2024-09-25at22 39 54-ezgif com-video-to-gif-converter

  1. When creating an object, then hitting enter, then starting a new-object, but instead of continuing I decide now, i hit undo, but then the previous object is deleted, instead of removing the empty object, which I would expect.

ScreenRecording2024-09-25at22 47 34-ezgif com-video-to-gif-converter

@timothyschoen
Copy link
Collaborator

Oh, I was aware there were still some undo issues, thanks for giving some examples. I'll fix these!

@tmhglnd
Copy link
Author

tmhglnd commented Sep 25, 2024

Thanks for giving it a look! Just wanted to add one more little thing:

  1. In bigger patches, after moving one thing and undo-ing, everything just moves a little bit, like only a few pixels.

ScreenRecording2024-09-26at00 16 04-ezgif com-video-to-gif-converter

@alcomposer alcomposer added bug Something isn't working gui labels Sep 28, 2024
@timothyschoen
Copy link
Collaborator

68b1957 should fix issues 1 and 2!

@jamshark70
Copy link

OK to add another issue here?

  1. Mouse select an object or two.
  2. Arrow-key move them on the canvas.
  3. Undo -- nothing happens.

@tmhglnd
Copy link
Author

tmhglnd commented Oct 2, 2024

I can replicate this issue. But, when I move the objects 2x or more I can undo once. Although clearly some undo history gets messed up in the process. Because if I follow these steps this is what happens:

  1. Add 2 objects
  2. Select them and move them with arrow keys 2x times
  3. Undo 1x (they move back one step)
  4. Undo 1x (last object added is deleted..., this should be moving back one more time)

@timothyschoen
Copy link
Collaborator

OK to add another issue here?

1. Mouse select an object or two.

2. Arrow-key move them on the canvas.

3. Undo -- nothing happens.

I can only reproduce this on v0.9.1, but not anymore on the nightly builds for v0.9.2. So maybe this is already fixed?

@timothyschoen
Copy link
Collaborator

Thanks for giving it a look! Just wanted to add one more little thing:

3. In bigger patches, after moving one thing and undo-ing, everything just moves a little bit, like only a few pixels.

ScreenRecording2024-09-26at00 16 04-ezgif com-video-to-gif-converter ScreenRecording2024-09-26at00 16 04-ezgif com-video-to-gif-converter

This also appears to be fixed on nightly builds. On v0.9.1, it still happened for me with metro-help.pd, but in v0.9.2 (nightly) it no longer does.

@tmhglnd
Copy link
Author

tmhglnd commented Oct 3, 2024

You're right, number 3 is fixed for me in 0.9.2! Great!

Number 2 is fixed as well! Although for me it requires 2x undo to get rid of the box. But nevertheless better than how it worked before, thanks.

Number 1 is as good as fixed, although I still see a small movement in the object when cmd-z is used. But it is tiny... It is no big deal but just for completion wanted to mention it, haha.

Untitled-ezgif com-video-to-gif-converter

@timothyschoen
Copy link
Collaborator

You're right, number 3 is fixed for me in 0.9.2! Great!

Number 2 is fixed as well! Although for me it requires 2x undo to get rid of the box. But nevertheless better than how it worked before, thanks.

Number 1 is as good as fixed, although I still see a small movement in the object when cmd-z is used. But it is tiny... It is no big deal but just for completion wanted to mention it, haha.

Untitled-ezgif com-video-to-gif-converter Untitled-ezgif com-video-to-gif-converter

Seems to be an issue specific to sliders, I don't get it with toggles. Pretty strange, I'll take a look at it later

@tmhglnd
Copy link
Author

tmhglnd commented Oct 4, 2024

Not sure if this is related to the undo/redo history, but maybe it is:

  1. When option-dragging an object (or group) to copy it, then do something else (like connecting something to this object, or copying some other objects, or creating an object), the object(s) jump back to it's "origin" (near the original object of where it was copied from). It seems the location after the copy-drag is not saved. Using the 0.9.2 nightly build.

ScreenRecording2024-10-04at22 52 59-ezgif com-video-to-gif-converter

@timothyschoen
Copy link
Collaborator

Not sure if this is related to the undo/redo history, but maybe it is:

4. When `option-dragging` an object (or group) to copy it, then do something else (like connecting something to this object, or copying some other objects, or creating an object), the object(s) jump back to it's "origin" (near the original object of where it was copied from). It seems the location after the copy-drag is not saved. Using the `0.9.2` nightly build.

ScreenRecording2024-10-04at22 52 59-ezgif com-video-to-gif-converter ScreenRecording2024-10-04at22 52 59-ezgif com-video-to-gif-converter

Oh, yep I messed this up when fixing the undo bug! Should be fixed with aa7a82a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gui
Projects
None yet
Development

No branches or pull requests

4 participants