diff options
author | Juan Linietsky <juan@godotengine.org> | 2019-03-03 17:53:59 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2019-03-03 17:57:16 -0300 |
commit | 8b4c4d9b2fbfa39e71bc1e4f4fcdd5377a9396e4 (patch) | |
tree | 7006dd0c89288c09d7b6b2faae393404406a6e64 /editor/animation_track_editor_plugins.cpp | |
parent | ae886a6f32b3cacc342ab3c4b52fa5e09d91fa49 (diff) | |
download | redot-engine-8b4c4d9b2fbfa39e71bc1e4f4fcdd5377a9396e4.tar.gz |
Implement a more coherent (and way less hack) way to block animation updates, fixes #24618
Diffstat (limited to 'editor/animation_track_editor_plugins.cpp')
-rw-r--r-- | editor/animation_track_editor_plugins.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index 399d561e28..baf417fed7 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -1004,12 +1004,10 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant ofs += 0.001; } - *get_block_animation_update_ptr() = true; get_undo_redo()->create_action(TTR("Add Audio Track Clip")); get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_insert_key", get_track(), ofs, stream); get_undo_redo()->add_undo_method(get_animation().ptr(), "track_remove_key_at_position", get_track(), ofs); get_undo_redo()->commit_action(); - *get_block_animation_update_ptr() = false; update(); return; @@ -1098,21 +1096,17 @@ void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) { float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale(); if (len_resizing_start) { float prev_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), len_resizing_index); - *get_block_animation_update_ptr() = true; get_undo_redo()->create_action(TTR("Change Audio Track Clip Start Offset")); get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, prev_ofs + ofs_local); get_undo_redo()->add_undo_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, prev_ofs); get_undo_redo()->commit_action(); - *get_block_animation_update_ptr() = false; } else { float prev_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), len_resizing_index); - *get_block_animation_update_ptr() = true; get_undo_redo()->create_action(TTR("Change Audio Track Clip End Offset")); get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, prev_ofs + ofs_local); get_undo_redo()->add_undo_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, prev_ofs); get_undo_redo()->commit_action(); - *get_block_animation_update_ptr() = false; } len_resizing = false; |