浏览代码

Fix error emitting when called new shader dialog from resource dialog

Yuri Roubinsky 3 年之前
父节点
当前提交
c34e806426
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      editor/create_dialog.cpp

+ 3 - 1
editor/create_dialog.cpp

@@ -339,8 +339,10 @@ void CreateDialog::_confirmed() {
 		memdelete(f);
 	}
 
-	emit_signal(SNAME("create"));
+	// To prevent, emitting an error from the transient window (shader dialog for example) hide this dialog before emitting the "create" signal.
 	hide();
+
+	emit_signal(SNAME("create"));
 	_cleanup();
 }