Skip to content

Add a way to force history for undoredo - #79796

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
KoBeWi:hack_and_slash
Jun 26, 2024
Merged

Add a way to force history for undoredo#79796
akien-mga merged 1 commit into
godotengine:masterfrom
KoBeWi:hack_and_slash

Conversation

@KoBeWi

@KoBeWi KoBeWi commented Jul 22, 2023

Copy link
Copy Markdown
Member

Fixes #79750

The problem was that visual shader editor created a new resource that was nested in an external resource and the action was created before that resource had a path. This made EditorUndoRedoManager assume that the nested resource is part of the scene (which is default assumption for built-in resources with empty path). It's difficult to automatically determine where the object should belong in this case, so I added a method force_correct_history(), which allows the user to explicitly tell the undo system that the object belongs to the correct history.

EDIT:
Added a fix for #91830 (comment) (error when renaming animation in external SpriteFrames)

Comment thread doc/classes/EditorUndoRedoManager.xml Outdated
@akien-mga
akien-mga merged commit 35683de into godotengine:master Jun 26, 2024
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@KoBeWi
KoBeWi deleted the hack_and_slash branch June 26, 2024 13:07
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Add a way to force history for undoredo
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Add a way to force history for undoredo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"UndoRedo history mismatch: expected 0, got 1" when dragging image from FileSystem tab onto Visual Shader Editor

3 participants