From aa929bc1f10566e05762ed8cdbd6e44f5b560085 Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Thu, 2 Apr 2015 15:32:37 -0300 Subject: [PATCH 1/2] fix_issue_#1594 --- tools/editor/plugins/mesh_editor_plugin.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index a3884f9be4d..753146e0401 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -32,8 +32,6 @@ void MeshInstanceEditor::_menu_option(int p_option) { Ref mesh = node->get_mesh(); if (mesh.is_null()) { - err_dialog->set_text("Mesh is empty!"); - err_dialog->popup_centered(Size2(100,50)); return; } From f77349a4c2735daec9402f71a16e531b06fdddef Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Fri, 3 Apr 2015 10:28:30 -0300 Subject: [PATCH 2/2] Better fix --- tools/editor/plugins/mesh_editor_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index 753146e0401..f8c75e1cf50 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -32,6 +32,8 @@ void MeshInstanceEditor::_menu_option(int p_option) { Ref mesh = node->get_mesh(); if (mesh.is_null()) { + err_dialog->set_text("Mesh is empty!"); + err_dialog->popup_centered(Size2(100,80)); return; } @@ -238,6 +240,9 @@ MeshInstanceEditor::MeshInstanceEditor() { add_child(outline_dialog); outline_dialog->connect("confirmed",this,"_create_outline_mesh"); + err_dialog = memnew( AcceptDialog ); + add_child(err_dialog); + }