From d8c14af546351a716b3e089b2573f4b81067b4c9 Mon Sep 17 00:00:00 2001 From: Maximillian Date: Tue, 6 Jan 2015 11:46:47 -0700 Subject: Fix invaild path error text in project manager when no path is entered --- tools/editor/project_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index cf94758ad6..0af4a23547 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -65,7 +65,7 @@ class NewProjectDialog : public ConfirmationDialog { error->set_text(""); get_ok()->set_disabled(true); DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - if (d->change_dir(project_path->get_text())!=OK) { + if (project_path->get_text() != "" && d->change_dir(project_path->get_text())!=OK) { error->set_text("Invalid Path for Project, Path Must Exist!"); memdelete(d); return false; @@ -82,7 +82,7 @@ class NewProjectDialog : public ConfirmationDialog { } else { - if (!d->file_exists("engine.cfg")) { + if (project_path->get_text() != "" && !d->file_exists("engine.cfg")) { error->set_text("Invalid Project Path (engine.cfg must exist)."); memdelete(d); -- cgit v1.2.3 From cf616e584586bb875bed5a817c531918233444c2 Mon Sep 17 00:00:00 2001 From: Maximillian Date: Tue, 6 Jan 2015 15:28:25 -0700 Subject: Prompt save dialog if running a unsaved scene. Solution for #966 --- tools/editor/editor_node.cpp | 29 ++++++++++++++++++++++++----- tools/editor/editor_node.h | 2 ++ 2 files changed, 26 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 5843a7cb28..7f75627a90 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -975,9 +975,19 @@ void EditorNode::_dialog_action(String p_file) { if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { _save_scene(p_file); + _run(false); } } break; + + case FILE_SAVE_AND_RUN: { + if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { + + _save_scene(p_file); + _run(false); + } + } break; + case FILE_EXPORT_MESH_LIBRARY: { Ref ml; @@ -1391,13 +1401,10 @@ void EditorNode::_run(bool p_current,const String& p_custom) { } if (scene->get_filename()=="") { - - current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text("I see.."); - accept->set_text("Scene has never been saved. Save before running!"); - accept->popup_centered(Size2(300,70));; + /**/ + _menu_option_confirm(FILE_SAVE_BEFORE_RUN, false); return; } @@ -1664,6 +1671,18 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } break; + case FILE_SAVE_BEFORE_RUN: { + if (!p_confirmed) { + accept->get_ok()->set_text("Yes"); + accept->set_text("This scene has never been saved. Save before running?"); + accept->popup_centered(Size2(300, 70)); + break; + } + + _menu_option(FILE_SAVE_AS_SCENE); + _menu_option_confirm(FILE_SAVE_AND_RUN, true); + } break; + case FILE_DUMP_STRINGS: { Node *scene = edited_scene; diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 381993646e..7560c2b149 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -108,6 +108,8 @@ class EditorNode : public Node { FILE_OPEN_SCENE, FILE_SAVE_SCENE, FILE_SAVE_AS_SCENE, + FILE_SAVE_BEFORE_RUN, + FILE_SAVE_AND_RUN, FILE_IMPORT_SUBSCENE, FILE_EXPORT_PROJECT, FILE_EXPORT_MESH_LIBRARY, -- cgit v1.2.3 From 5d86f845d7a67ec9e2c71fe975e1abcbb1a97097 Mon Sep 17 00:00:00 2001 From: Maximillian Date: Tue, 6 Jan 2015 20:35:52 -0700 Subject: fix little mistake that made the project run each save --- tools/editor/editor_node.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'tools') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 7f75627a90..52c75c6d7e 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -975,7 +975,6 @@ void EditorNode::_dialog_action(String p_file) { if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { _save_scene(p_file); - _run(false); } } break; -- cgit v1.2.3 From f1b9994cbcb682defb745e2d69503984324416be Mon Sep 17 00:00:00 2001 From: Maximillian Date: Thu, 8 Jan 2015 09:14:56 -0700 Subject: Fix process being debugged has exited pop up #1128 --- tools/editor/script_editor_debugger.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'tools') diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index 024377ad18..5043c5cdcd 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -478,8 +478,6 @@ void ScriptEditorDebugger::_notification(int p_what) { if (!connection->is_connected()) { stop(); editor->notify_child_process_exited(); //somehow, exited - msgdialog->set_text("Process being debugged exited."); - msgdialog->popup_centered(Size2(250,100)); break; }; -- cgit v1.2.3