summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-05 11:29:09 +0100
committerGitHub <noreply@github.com>2019-01-05 11:29:09 +0100
commit021421e1808d68e7fb6d87ed027d3dc454b3291e (patch)
tree1aeb8d9c04b56f0d46d7cec260521cd6f4c1095e
parent07014864d0d8df5a238fd7eb4d6c489e5d75f823 (diff)
parent855a82211f148b30f1fa461b7829bef3c8051fbc (diff)
Merge pull request #24782 from SoIAS/duplicated_code_24781
Removed duplicated code in animation_track_editor.cpp
-rw-r--r--editor/animation_track_editor.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index a3785f7605..0ba45a596e 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -4053,18 +4053,10 @@ void AnimationTrackEditor::_move_selection_commit() {
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
}
- // 6-(undo) reinsert overlapped keys
- for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
-
- _AnimMoveRestore &amr = E->get();
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
- }
-
undo_redo->add_do_method(this, "_clear_selection_for_anim", animation);
undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation);
// 7-reselect
-
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
float oldpos = E->get().pos;
@@ -4535,18 +4527,10 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
}
- // 6-(undo) reinsert overlapped keys
- for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
-
- _AnimMoveRestore &amr = E->get();
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
- }
-
undo_redo->add_do_method(this, "_clear_selection_for_anim", animation);
undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation);
// 7-reselect
-
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
float oldpos = E->get().pos;