浏览代码

fix animation error player error focus

sam 1 年之前
父节点
当前提交
943aeb4573
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      editor/plugins/animation_player_editor_plugin.cpp
  2. 1 1
      editor/plugins/animation_player_editor_plugin.h

+ 2 - 2
editor/plugins/animation_player_editor_plugin.cpp

@@ -2038,10 +2038,10 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
 	vb->add_child(name_hb);
 	name_dialog->register_text_enter(name);
 
-	error_dialog = memnew(ConfirmationDialog);
+	error_dialog = memnew(AcceptDialog);
 	error_dialog->set_ok_button_text(TTR("Close"));
 	error_dialog->set_title(TTR("Error!"));
-	add_child(error_dialog);
+	name_dialog->add_child(error_dialog);
 
 	name_dialog->connect(SNAME("confirmed"), callable_mp(this, &AnimationPlayerEditor::_animation_name_edited));
 

+ 1 - 1
editor/plugins/animation_player_editor_plugin.h

@@ -128,7 +128,7 @@ class AnimationPlayerEditor : public VBoxContainer {
 	} blend_editor;
 
 	ConfirmationDialog *name_dialog = nullptr;
-	ConfirmationDialog *error_dialog = nullptr;
+	AcceptDialog *error_dialog = nullptr;
 	int name_dialog_op = TOOL_NEW_ANIM;
 
 	bool updating = false;