logisim-evolution / logisim-evolution

Digital logic design tool and simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do/Un-Do/Re-Do not positioning properly

miczac opened this issue · comments

In v3.8 a Do/Do/Undo/Undo/Re-Do/Re-Do sequence the last Re-Do messes up the circuit.
I can provide a screen recording and an example file. (.zip)
move_ctrl_z_bug.zip
This is on Mac OS 10.14.6.
Thanks a lot, Michael.

Just checked on an up-to-date Arch Linux w/ Cinnamon: behaves exactly the same.
HTH, Michael.

Thank you for the report. I can reproduce the problem. I ran into a similar issue a week or so ago and I was trying to figure out what is happening.

I suspect it has to do with the fact that selection / deselection is not actually recorded in the undo stack, but some actions that are recorded apply to the selected objects. This will require more research and careful thinking.

Thanks for the quick response!
It appears the issue with what's recorded to the stack is more complex.
In this example, I just stumbled upon, moving a freshly pasted object gets skipped in the undo queue.
(if I put this correctly)
You can see, move doesn't appear in the undo-menu.
A second move got recorded though.

Screen.Recording.2024-02-06.at.04.15.06.mp4

@miczac: I don't think that the paste drag behavior is a problem. The paste puts a selected object on the screen, but doesn't actually attach it. That way, you can drag it to where you want it without it grabbing a wire by accident and causing it to deform. It isn't until you drop it that the "paste" is actually attached to the diagram. Of course, if you do something to deselect it where it pasted, it would be attached at that point. Given that behavior, it would actually be a problem to undo the move without undoing the paste since that would attach it where it was never attached before.