Skip to content

Commit

Permalink
Merge pull request #27254 from piyushdagar/fix-animation
Browse files Browse the repository at this point in the history
Fixes Adding animation to AnimatedSprite doesn't update inspector immmediately #26381
  • Loading branch information
akien-mga authored Apr 5, 2019
2 parents 19a6a62 + d86d798 commit 570fa6a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions editor/plugins/sprite_frames_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,6 @@ void SpriteFramesEditor::_animation_name_edited() {
for (List<Node *>::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);
}
Expand Down Expand Up @@ -382,9 +379,6 @@ void SpriteFramesEditor::_animation_add() {
for (List<Node *>::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);
}
Expand Down

0 comments on commit 570fa6a

Please sign in to comment.