summaryrefslogtreecommitdiffstats
path: root/editor/animation_bezier_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/animation_bezier_editor.cpp')
-rw-r--r--editor/animation_bezier_editor.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index a16446aea6..baec996016 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -1397,8 +1397,10 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
}
// 6-(undo) reinsert overlapped keys
- for (int i = 0; i < to_restore.size(); i++) {
- const AnimMoveRestore &amr = to_restore[i];
+ List<AnimMoveRestore>::ConstIterator restore_itr = to_restore.begin();
+ List<Animation::HandleMode>::ConstIterator handle_itr = to_restore_handle_modes.begin();
+ for (; restore_itr != to_restore.end() && handle_itr != to_restore_handle_modes.end(); ++restore_itr, ++handle_itr) {
+ const AnimMoveRestore &amr = *restore_itr;
Array key = amr.key;
undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, 1);
undo_redo->add_undo_method(
@@ -1409,7 +1411,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
key[0],
Vector2(key[1], key[2]),
Vector2(key[3], key[4]),
- to_restore_handle_modes[i]);
+ *handle_itr);
}
undo_redo->add_do_method(this, "_clear_selection_for_anim", animation);
@@ -1937,7 +1939,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
- play_position->connect("draw", callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw));
+ play_position->connect(SceneStringName(draw), callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw));
set_focus_mode(FOCUS_CLICK);
set_clip_contents(true);