godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.35k stars 21.06k forks source link

TileMap/GridMap breaks UndoRedo and makes the editor unusable #39802

Closed KoBeWi closed 3 years ago

KoBeWi commented 4 years ago

Godot version:

4c0b077 and 3.2.2

Issue description:

This is related to #24970 #21528 and likely #39393

When you draw on TileMap or GridMap and Alt+Tab while holding mouse button, you will not be able to undo anymore when you refocus editor and click. Also any action that uses UndoRedo (including changing scenes) will fail and throw these errors

 core/undo_redo.cpp:373 - Condition "action_level > 0" is true. Returned: ""
 core/undo_redo.cpp:346 - Condition "action_level > 0" is true. Returned: false

Minimal reproduction project:

ReproductionProject.zip

akien-mga commented 4 years ago

This is fixed for TileMap in #42489.

ghost commented 3 years ago

I'm currently still having the issue, version 3.2.3. I was alt-tabbing between Aseprite and Godot. Perhaps I clicked an Aseprite hotkey in Aseprite that caused some kind of weird mode? No visual queue popped up that I could tell, and a mode where you can't "undo" seems important to flag to the user.

Edit: Current "fix" for the issue on my end was just deleting the tilemap. Thankfully I don't group all my assets into a singular tilemap node, so I didn't have to redo a lot. I'm sure there's an actual fix out there for this, I just thought I would drop this here for anyone completely new to Godot like I am.