You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you change the Anchors Preset of a Control, and then hit Undo, the previous Control will have its previous Preset restored, but it won't restore its previous position unless it was the default position of that preset
Video:
GodotLayoutUndoGlitch.mp4
Steps to reproduce
Create a Container and put a Control in it. For example, create a Panel and put a Button in it.
Access the Button's Layout, ensure Layout Mode is set to Anchors, and then change Anchor Preset to Bottom Right.
Observe the Button is in the bottom right of the Panel
Move the Button from its default position. Observe this new position.
Set the Anchor Preset to Top Left (or any other). Note the button will change is position.
Hit Undo (Ctrl+Z)
Expected:
The Button should return to it's previous position, as at the end of step 4.
Actual:
The button is instead returned to default position for Bottom Right, the position it was at at the end of Step 3.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
@TheSofox Remember that for GitHub video previews to work, you need to have a blank line before and after the video URL. I edited your post accordingly, but remember to do this in the future 🙂
Yes, my PR is coded to account for that. If either Layout Mode or Anchors Preset is changed, the undo operation will revert the control's entire state, instead of just reverting a single property. I did a quick test to confirm all this.
Godot version
4.2rc
System information
Godot v4.2.rc (fa4a653) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 Threads)
Issue description
If you change the Anchors Preset of a Control, and then hit Undo, the previous Control will have its previous Preset restored, but it won't restore its previous position unless it was the default position of that preset
Video:
GodotLayoutUndoGlitch.mp4
Steps to reproduce
Expected:
The Button should return to it's previous position, as at the end of step 4.
Actual:
The button is instead returned to default position for Bottom Right, the position it was at at the end of Step 3.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: