Avoid crash on changing snap mode when no animation exists, closes #28031
This commit is contained in:
parent
caaa492133
commit
0d41f8fb00
|
@ -2540,6 +2540,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);
|
||||||
|
@ -2548,6 +2549,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