diff options
Diffstat (limited to 'tools/editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 1349d5ccab..72b3025f2f 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -630,11 +630,13 @@ bool ScriptEditor::_test_script_times_on_disk() { - if (!all_ok) - if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false))) + if (!all_ok) { + if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false))) { script_editor->_reload_scripts(); - else + } else { disk_changed->call_deferred("popup_centered_ratio",0.5); + } + } return all_ok; } @@ -920,7 +922,7 @@ void ScriptEditor::_menu_option(int p_option) { String line_text = tx->get_line(i); if (line_text.begins_with("#")) - line_text = line_text.strip_edges().substr(1, line_text.length()); + line_text = line_text.substr(1, line_text.length()); else line_text = "#" + line_text; tx->set_line(i, line_text); @@ -932,7 +934,7 @@ void ScriptEditor::_menu_option(int p_option) { String line_text = tx->get_line(begin); if (line_text.begins_with("#")) - line_text = line_text.strip_edges().substr(1, line_text.length()); + line_text = line_text.substr(1, line_text.length()); else line_text = "#" + line_text; tx->set_line(begin, line_text); |