diff options
author | Gordon MacPherson <gordon@gordonite.tech> | 2021-08-14 07:42:18 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-09-21 13:56:47 +0200 |
commit | 1881b3adc555f84cce8d9a0b0231bb2aa1b10d2d (patch) | |
tree | 554dcc9d7ba3afdd4e3fa938161defb202aad3ea /editor | |
parent | 91960b7b81523cb545b2dfb47c235cf21dd460f3 (diff) | |
download | redot-engine-1881b3adc555f84cce8d9a0b0231bb2aa1b10d2d.tar.gz |
Improve GDScript Editor and Improve latency
Improvements:
- GDScript Highlighter is faster by 25% as keys are smaller (hashes instead of strings)
- Removes message queue from _apply_settings_change to allow resize to work correctly
- Some performance fixes are pending still
Note: this resolves the code editor behaving badly when resizing in debug builds
Diffstat (limited to 'editor')
-rw-r--r-- | editor/code_editor.cpp | 9 | ||||
-rw-r--r-- | editor/code_editor.h | 2 |
2 files changed, 1 insertions, 10 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 2944dd9991..7bf82fbd1b 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1579,17 +1579,10 @@ void CodeTextEditor::_update_text_editor_theme() { } void CodeTextEditor::_on_settings_change() { - if (settings_changed) { - return; - } - - settings_changed = true; - MessageQueue::get_singleton()->push_callable(callable_mp(this, &CodeTextEditor::_apply_settings_change)); + _apply_settings_change(); } void CodeTextEditor::_apply_settings_change() { - settings_changed = false; - _update_text_editor_theme(); font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size"); diff --git a/editor/code_editor.h b/editor/code_editor.h index dfe6561f13..3c52a0c6e8 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -162,8 +162,6 @@ class CodeTextEditor : public VBoxContainer { int error_line; int error_column; - bool settings_changed = false; - void _on_settings_change(); void _apply_settings_change(); |