summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/SceneTree.xml1
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 06800082cb..7a15153fc2 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -207,6 +207,7 @@
Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code.
By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error.
For portability reasons, the exit code should be set between 0 and 125 (inclusive).
+ [b]Note:[/b] On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button.
</description>
</method>
<method name="reload_current_scene">
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 156b7782ef..4b7faec228 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2451,7 +2451,9 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const
script_list->select(script_list->find_metadata(i));
// Save the current script so the changes can be picked up by an external editor.
- save_current_script();
+ if (!_is_built_in_script(script.ptr())) { // But only if it's not built-in script.
+ save_current_script();
+ }
break;
}