playcanvas / supersplat

3D Gaussian Splat Editor
https://playcanvas.com/supersplat/editor
MIT License
1.38k stars 132 forks source link

Undo/Redo causes unwanted rotation #232

Open simonbethke opened 3 hours ago

simonbethke commented 3 hours ago

Steps to reproduce:

1) Open a scene 2) Rotated it by typing a number in the rotation 3) Make a rectangular selection 4) Delete it using the del-key 5) Undo that using CTRL-Z 6) Press CTRL-Z again (no effect) 7) Now click the Undo-Button (the selection will rotate shortly and then rotated back) 8) Click the Redo-Button (you have a rotated selection)

slimbuck commented 2 hours ago

I suspect this has to do with the keyboard focus.

If the number entry has focus then undo is handled by the edit box itself, not the undo system.

simonbethke commented 2 hours ago

If that is the case, you need to remove the focus when adding operations to the history stack. Also you need to ensure, that the default text-undo is prevented