From a329f6fa0b5c0ce47fc5756334cf1674c10175f5 Mon Sep 17 00:00:00 2001 From: piyushdagar Date: Wed, 20 Mar 2019 09:08:39 +0530 Subject: [PATCH] Fixes Adding animation to AnimatedSprite doesn't update inspector immediately (cherry picked from commit d86d7981ccb4845fd591f90084a1d0557448e921) --- editor/plugins/sprite_frames_editor_plugin.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 89bb7440feb..5ba2fde7638 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -347,9 +347,6 @@ void SpriteFramesEditor::_animation_name_edited() { for (List::Element *E = nodes.front(); E; E = E->next()) { String current = E->get()->call("get_animation"); - if (current != edited_anim) - continue; - undo_redo->add_do_method(E->get(), "set_animation", name); undo_redo->add_undo_method(E->get(), "set_animation", edited_anim); } @@ -382,9 +379,6 @@ void SpriteFramesEditor::_animation_add() { for (List::Element *E = nodes.front(); E; E = E->next()) { String current = E->get()->call("get_animation"); - if (frames->has_animation(current)) - continue; - undo_redo->add_do_method(E->get(), "set_animation", name); undo_redo->add_undo_method(E->get(), "set_animation", current); }