Avoid crash on changing snap mode when no animation exists, closes #28031
(cherry picked from commit 0d41f8fb00
)
This commit is contained in:
parent
71753edeae
commit
5e02d6d98a
|
@ -2466,6 +2466,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) {
|
||||||
step->set_block_signals(false);
|
step->set_block_signals(false);
|
||||||
step->set_read_only(false);
|
step->set_read_only(false);
|
||||||
snap->set_disabled(false);
|
snap->set_disabled(false);
|
||||||
|
snap_mode->set_disabled(true);
|
||||||
} else {
|
} else {
|
||||||
hscroll->hide();
|
hscroll->hide();
|
||||||
edit->set_disabled(true);
|
edit->set_disabled(true);
|
||||||
|
@ -2474,6 +2475,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim) {
|
||||||
step->set_block_signals(false);
|
step->set_block_signals(false);
|
||||||
step->set_read_only(true);
|
step->set_read_only(true);
|
||||||
snap->set_disabled(true);
|
snap->set_disabled(true);
|
||||||
|
snap_mode->set_disabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue