summaryrefslogtreecommitdiff
path: root/tools/editor/script_create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/script_create_dialog.cpp')
-rw-r--r--tools/editor/script_create_dialog.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp
index e93a40efbc..749198314a 100644
--- a/tools/editor/script_create_dialog.cpp
+++ b/tools/editor/script_create_dialog.cpp
@@ -117,20 +117,20 @@ void ScriptCreateDialog::ok_pressed() {
- String text = ScriptServer::get_language( language_menu->get_selected() )->get_template(cname,parent_name->get_text());
- Script *script = ScriptServer::get_language( language_menu->get_selected() )->create_script();
- script->set_source_code(text);
- if (cname!="")
- script->set_name(cname);
+ Ref<Script> scr = ScriptServer::get_language( language_menu->get_selected() )->get_template(cname,parent_name->get_text());
+ //scr->set_source_code(text);
+
+
+ if (cname!="")
+ scr->set_name(cname);
- Ref<Script> scr(script);
if (!internal->is_pressed()) {
String lpath = Globals::get_singleton()->localize_path(file_path->get_text());
- script->set_path(lpath);
+ scr->set_path(lpath);
if (!path_valid) {
alert->set_text(TTR("Invalid path!"));
@@ -145,7 +145,7 @@ void ScriptCreateDialog::ok_pressed() {
alert->popup_centered_minsize();
return;
}
- scr->set_path(lpath);
+ //scr->set_path(lpath);
//EditorFileSystem::get_singleton()->update_file(lpath,scr->get_type());