diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-30 13:47:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 13:47:52 +0200 |
commit | 1ca65b5e26c504a6bab1dbb5b19370641cdb7234 (patch) | |
tree | ec121140484a779a7b4fca45c5249e24062e319c | |
parent | 9591e587fe6d28b4819e7dc39a0fe1494fb0d892 (diff) | |
parent | 2041e21eb5eb8b6473c337a7191069f4f8853c61 (diff) |
Merge pull request #25751 from Calinou/faster-script-error-checking
Allow floating-point values in the idle parse delay editor setting
-rw-r--r-- | editor/code_editor.cpp | 4 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index d655f52f5d..ec984e480a 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1297,6 +1297,8 @@ void CodeTextEditor::_on_settings_change() { text_editor->set_callhint_settings( EDITOR_DEF("text_editor/completion/put_callhint_tooltip_below_current_line", true), EDITOR_DEF("text_editor/completion/callhint_tooltip_offset", Vector2())); + + idle->set_wait_time(EDITOR_DEF("text_editor/completion/idle_parse_delay", 2.0)); } void CodeTextEditor::_text_changed_idle_timeout() { @@ -1411,7 +1413,7 @@ CodeTextEditor::CodeTextEditor() { idle = memnew(Timer); add_child(idle); idle->set_one_shot(true); - idle->set_wait_time(EDITOR_DEF("text_editor/completion/idle_parse_delay", 2)); + idle->set_wait_time(EDITOR_DEF("text_editor/completion/idle_parse_delay", 2.0)); code_complete_timer = memnew(Timer); add_child(code_complete_timer); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index bf582ca004..b65a484b16 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -459,7 +459,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("text_editor/cursor/right_click_moves_caret", true); // Completion - _initial_set("text_editor/completion/idle_parse_delay", 2); + _initial_set("text_editor/completion/idle_parse_delay", 2.0); + hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::REAL, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01"); _initial_set("text_editor/completion/auto_brace_complete", false); _initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true); _initial_set("text_editor/completion/callhint_tooltip_offset", Vector2()); |