@@ -6681,7 +6681,6 @@ void AnimationTrackEditor::goto_next_step(bool p_from_mouse_event, bool p_timeli
6681
6681
}
6682
6682
6683
6683
void AnimationTrackEditor::_edit_menu_pressed (int p_option) {
6684
- last_menu_track_opt = p_option;
6685
6684
switch (p_option) {
6686
6685
case EDIT_COPY_TRACKS: {
6687
6686
track_copy_select->clear ();
@@ -6841,11 +6840,15 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
6841
6840
6842
6841
undo_redo->commit_action ();
6843
6842
} break ;
6844
-
6845
- case EDIT_SCALE_SELECTION:
6843
+ case EDIT_SCALE_SELECTION: {
6844
+ scale_dialog->popup_centered (Size2 (200 , 100 ) * EDSCALE);
6845
+ scale->get_line_edit ()->grab_focus ();
6846
+ scale_from_cursor = false ;
6847
+ } break ;
6846
6848
case EDIT_SCALE_FROM_CURSOR: {
6847
6849
scale_dialog->popup_centered (Size2 (200 , 100 ) * EDSCALE);
6848
6850
scale->get_line_edit ()->grab_focus ();
6851
+ scale_from_cursor = true ;
6849
6852
} break ;
6850
6853
case EDIT_SCALE_CONFIRM: {
6851
6854
if (selection.is_empty ()) {
@@ -6868,9 +6871,8 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
6868
6871
}
6869
6872
6870
6873
len = to_t - from_t ;
6871
- if (last_menu_track_opt == EDIT_SCALE_FROM_CURSOR ) {
6874
+ if (scale_from_cursor ) {
6872
6875
pivot = timeline->get_play_position ();
6873
-
6874
6876
} else {
6875
6877
pivot = from_t ;
6876
6878
}
@@ -6912,7 +6914,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
6912
6914
to_restore.push_back (amr);
6913
6915
}
6914
6916
6915
- #define NEW_POS (m_ofs ) (((s > 0 ) ? m_ofs : from_t + (len - (m_ofs - from_t ))) - pivot) * Math::abs (s) + from_t
6917
+ #define NEW_POS (m_ofs ) (((s > 0 ) ? m_ofs : from_t + (len - (m_ofs - from_t ))) - pivot) * Math::abs (s) + pivot
6916
6918
// 3 - Move the keys (re insert them).
6917
6919
for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev ()) {
6918
6920
float newpos = NEW_POS (E->get ().pos );
0 commit comments