瀏覽代碼

fix animation bezier crash on undo

emild 1 年之前
父節點
當前提交
e97428c96b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      editor/animation_bezier_editor.cpp

+ 2 - 2
editor/animation_bezier_editor.cpp

@@ -872,14 +872,14 @@ void AnimationBezierTrackEdit::_change_selected_keys_handle_mode(Animation::Hand
 }
 
 void AnimationBezierTrackEdit::_clear_selection_for_anim(const Ref<Animation> &p_anim) {
-	if (!(animation == p_anim)) {
+	if (!(animation == p_anim) || !is_visible()) {
 		return;
 	}
 	_clear_selection();
 }
 
 void AnimationBezierTrackEdit::_select_at_anim(const Ref<Animation> &p_anim, int p_track, real_t p_pos, bool p_single) {
-	if (!(animation == p_anim)) {
+	if (!(animation == p_anim) || !is_visible()) {
 		return;
 	}