summaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-09-12 16:42:54 +0200
committerGitHub <noreply@github.com>2018-09-12 16:42:54 +0200
commit68cc2cf3bfd6ec402e4c39fa44e59f5605da7786 (patch)
tree4c89164aa83fde5a791ba840c58e2f22ca90880c /editor/plugins/script_editor_plugin.cpp
parent82a0e752dfd1346fba4fa20454065891f91e48cf (diff)
parentfb77cdf2f29c8fe5a75bc12a6c36c7eec192d64d (diff)
Merge pull request #21997 from akien-mga/fix-script-name
Fix default script name in ScriptCreateDialog
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 706bda4089..f25ca4786e 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -946,7 +946,7 @@ void ScriptEditor::_menu_option(int p_option) {
switch (p_option) {
case FILE_NEW: {
- script_create_dialog->config("Node", ".gd");
+ script_create_dialog->config("Node", "new_script");
script_create_dialog->popup_centered(Size2(300, 300) * EDSCALE);
} break;
case FILE_NEW_TEXTFILE: {
@@ -1749,7 +1749,7 @@ void ScriptEditor::_update_script_names() {
} break;
case DISPLAY_DIR_AND_NAME: {
if (!path.get_base_dir().get_file().empty()) {
- sd.name = path.get_base_dir().get_file() + "/" + name;
+ sd.name = path.get_base_dir().get_file().plus_file(name);
} else {
sd.name = name;
}
@@ -2114,8 +2114,6 @@ void ScriptEditor::_editor_play() {
debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_STEP), true);
debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), false);
debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true);
-
- //debugger_gui->start_listening(Globals::get_singleton()->get("debug/debug_port"));
}
void ScriptEditor::_editor_pause() {