diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-02-09 21:35:52 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-02-09 21:35:52 -0300 |
commit | 80d0117b837ee90e2c0b8cf790f4428a4796c4b6 (patch) | |
tree | 735704a83e6b573994cf3a62bb9a82251b3187e5 /tools | |
parent | 85edf05343544a0171c27bc6788dafa14f697846 (diff) | |
parent | 5a4ef1c2cc400ff7fe67714435cadb070dc9cdd5 (diff) |
Merge pull request #1174 from adolson/autoreload-edited-scripts
add option to automatically reload changed scripts
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 4b7d1cf0e0..1349d5ccab 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -631,7 +631,10 @@ bool ScriptEditor::_test_script_times_on_disk() { if (!all_ok) - disk_changed->call_deferred("popup_centered_ratio",0.5); + if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false))) + script_editor->_reload_scripts(); + else + disk_changed->call_deferred("popup_centered_ratio",0.5); return all_ok; } @@ -1806,6 +1809,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) { script_editor->hide(); + EDITOR_DEF("text_editor/auto_reload_changed_scripts",false); EDITOR_DEF("external_editor/use_external_editor",false); EDITOR_DEF("external_editor/exec_path",""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"external_editor/exec_path",PROPERTY_HINT_GLOBAL_FILE)); |