-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defer updating the animations Tree in SpriteFramesEditor to avoid crashes #81643
Merged
akien-mga
merged 1 commit into
godotengine:master
from
Rindbee:defer-rebuild-the-animations-tree-in-SpriteFramesEditor
Oct 18, 2023
Merged
Defer updating the animations Tree in SpriteFramesEditor to avoid crashes #81643
akien-mga
merged 1 commit into
godotengine:master
from
Rindbee:defer-rebuild-the-animations-tree-in-SpriteFramesEditor
Oct 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KoBeWi
reviewed
Oct 16, 2023
KoBeWi
reviewed
Oct 16, 2023
Rindbee
force-pushed
the
defer-rebuild-the-animations-tree-in-SpriteFramesEditor
branch
3 times, most recently
from
October 17, 2023 02:17
0b81926
to
a5d1334
Compare
A mechanism similar to |
KoBeWi
reviewed
Oct 17, 2023
Rindbee
force-pushed
the
defer-rebuild-the-animations-tree-in-SpriteFramesEditor
branch
2 times, most recently
from
October 17, 2023 12:16
68459d7
to
a1449f7
Compare
Fix the edited animation not updating when undoing. Before: 0.mp4After: 1.mp4 |
KoBeWi
reviewed
Oct 17, 2023
KoBeWi
approved these changes
Oct 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't really reproduce the crash to test the fix, but the changes look fine.
…shes Previously, clicking the LMB while renaming an animation could cause `SpriteFramesEditor::_update_library(false)` to be called during `Tree::propagate_mouse_event()`. This may cause a crash. We can defer updates to the editor interface to avoid calling `Tree::create_item()` at the wrong time. Enables `SpriteFramesEditor::_select_animation()` to be able to undo/redo
Rindbee
force-pushed
the
defer-rebuild-the-animations-tree-in-SpriteFramesEditor
branch
from
October 17, 2023 22:46
a1449f7
to
2642c68
Compare
Thanks! |
Rindbee
deleted the
defer-rebuild-the-animations-tree-in-SpriteFramesEditor
branch
October 18, 2023 15:25
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, clicking the LMB while renaming an animation could cause
SpriteFramesEditor::_update_library(false)
to be called duringTree::propagate_mouse_event()
. This may cause a crash.godot/scene/gui/tree.cpp
Lines 3783 to 3784 in 3ed4497
godot/scene/gui/tree.cpp
Lines 4290 to 4291 in 3ed4497
godot/editor/plugins/sprite_frames_editor_plugin.cpp
Lines 1222 to 1223 in 3ed4497
We can defer updates to the editor interface to avoid calling
Tree::create_item()
at the wrong time.Fix #79149.