summaryrefslogtreecommitdiffstats
path: root/editor/animation_track_editor.cpp
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2020-07-15 01:05:04 +0200
committerkobewi <kobewi4e@gmail.com>2021-03-21 00:24:16 +0100
commitf45e4c57f1a070b42ef6a47420f21554ab79b494 (patch)
tree97a02e578040625ce6ce17829946d643aa7cb3cc /editor/animation_track_editor.cpp
parent6d13bfc914beba391051bc213ba8fc4118825d87 (diff)
downloadredot-engine-f45e4c57f1a070b42ef6a47420f21554ab79b494.tar.gz
Allow to move timeline without moving animation
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r--editor/animation_track_editor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 804f02765c..d9eb8d8b38 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -1657,7 +1657,7 @@ void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
int x = mb->get_position().x - get_name_limit();
float ofs = x / get_zoom_scale() + get_value();
- emit_signal("timeline_changed", ofs, false);
+ emit_signal("timeline_changed", ofs, false, Input::get_singleton()->is_key_pressed(KEY_ALT));
dragging_timeline = true;
}
if (!dragging_timeline && mb->get_button_index() == BUTTON_MIDDLE) {
@@ -1696,7 +1696,7 @@ void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (dragging_timeline) {
int x = mm->get_position().x - get_name_limit();
float ofs = x / get_zoom_scale() + get_value();
- emit_signal("timeline_changed", ofs, false);
+ emit_signal("timeline_changed", ofs, false, Input::get_singleton()->is_key_pressed(KEY_ALT));
}
if (panning_timeline) {
int x = mm->get_position().x - get_name_limit();
@@ -3250,8 +3250,8 @@ void AnimationTrackEditor::_name_limit_changed() {
}
}
-void AnimationTrackEditor::_timeline_changed(float p_new_pos, bool p_drag) {
- emit_signal("timeline_changed", p_new_pos, p_drag);
+void AnimationTrackEditor::_timeline_changed(float p_new_pos, bool p_drag, bool p_timeline_only) {
+ emit_signal("timeline_changed", p_new_pos, p_drag, p_timeline_only);
}
void AnimationTrackEditor::_track_remove_request(int p_track) {