You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Defer updating the animations Tree in SpriteFramesEditor to avoid crashes
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
This commit is contained in:
@@ -189,6 +189,7 @@ class SpriteFramesEditor : public HSplitContainer {
|
||||
void _down_pressed();
|
||||
void _frame_duration_changed(double p_value);
|
||||
void _update_library(bool p_skip_selector = false);
|
||||
void _update_library_impl();
|
||||
|
||||
void _update_stop_icon();
|
||||
void _play_pressed();
|
||||
@@ -214,6 +215,9 @@ class SpriteFramesEditor : public HSplitContainer {
|
||||
void _zoom_out();
|
||||
void _zoom_reset();
|
||||
|
||||
bool animations_dirty = false;
|
||||
bool pending_update = false;
|
||||
|
||||
bool updating;
|
||||
bool updating_split_settings = false; // Skip SpinBox/Range callback when setting value by code.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user