Merge pull request #24771 from timoschwarzer/animation-player-editor-pos-drag-fix

Fix AnimationPlayer editor length and step synchronization
This commit is contained in:
Rémi Verschelde 2019-05-24 15:21:47 +02:00 committed by GitHub
commit 04ee4f45e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 18 deletions

View file

@ -3656,7 +3656,8 @@ void AnimationTrackEditor::_update_step(double p_new_step) {
step->set_block_signals(true);
undo_redo->commit_action();
step->set_block_signals(false);
emit_signal("animation_step_changed", step_value);
emit_signal("animation_step_changed", p_new_step);
animation->_change_notify("step");
}
void AnimationTrackEditor::_update_length(double p_new_len) {
@ -4931,7 +4932,6 @@ void AnimationTrackEditor::_bind_methods() {
ClassDB::bind_method("_update_scroll", &AnimationTrackEditor::_update_scroll);
ClassDB::bind_method("_update_tracks", &AnimationTrackEditor::_update_tracks);
ClassDB::bind_method("_update_step", &AnimationTrackEditor::_update_step);
ClassDB::bind_method("_update_length", &AnimationTrackEditor::_update_length);
ClassDB::bind_method("_dropped_track", &AnimationTrackEditor::_dropped_track);
ClassDB::bind_method("_add_track", &AnimationTrackEditor::_add_track);
ClassDB::bind_method("_new_track_node_selected", &AnimationTrackEditor::_new_track_node_selected);
@ -4992,7 +4992,6 @@ AnimationTrackEditor::AnimationTrackEditor() {
timeline->connect("name_limit_changed", this, "_name_limit_changed");
timeline->connect("track_added", this, "_add_track");
timeline->connect("value_changed", this, "_timeline_value_changed");
timeline->connect("length_changed", this, "_update_length");
scroll = memnew(ScrollContainer);
timeline_vbox->add_child(scroll);