diff options
author | kobewi <kobewi4e@gmail.com> | 2024-10-22 15:52:29 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2024-10-22 15:54:17 +0200 |
commit | d5fbc7dab1d4d417e4b4f9e9db680135b4636055 (patch) | |
tree | 478e96d42fa5989c636d48e819161f51a46732b7 /editor | |
parent | b3bcb2dc14691f7729984128dca26a844f662fa1 (diff) | |
download | redot-engine-d5fbc7dab1d4d417e4b4f9e9db680135b4636055.tar.gz |
Improve Scale Selection in Animation tab
Diffstat (limited to 'editor')
-rw-r--r-- | editor/animation_track_editor.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 741d127ea2..ebaf368b5e 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -6586,6 +6586,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { case EDIT_SCALE_SELECTION: case EDIT_SCALE_FROM_CURSOR: { scale_dialog->popup_centered(Size2(200, 100) * EDSCALE); + scale->get_line_edit()->grab_focus(); } break; case EDIT_SCALE_CONFIRM: { if (selection.is_empty()) { @@ -7806,10 +7807,13 @@ AnimationTrackEditor::AnimationTrackEditor() { scale->set_min(-99999); scale->set_max(99999); scale->set_step(0.001); + scale->set_select_all_on_focus(true); vbc->add_margin_child(TTR("Scale Ratio:"), scale); - scale_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_SCALE_CONFIRM)); + scale_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_SCALE_CONFIRM), CONNECT_DEFERRED); add_child(scale_dialog); + scale_dialog->register_text_enter(scale->get_line_edit()); + // ease_dialog = memnew(ConfirmationDialog); ease_dialog->set_title(TTR("Select Transition and Easing")); |