From 23d6225c1e59f33cc6cfe0df3a00961c0c93155f Mon Sep 17 00:00:00 2001 From: Rindbee Date: Mon, 24 Apr 2023 17:11:33 +0800 Subject: [PATCH] Fix `line_spacing` in code editor will not take effect immediately on change Previously, in CodeTextEditor, `line_spacing` was forgotten to update when the editor setting property changed. --- editor/code_editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 10c173ffe879..61df3a977ad8 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1049,6 +1049,7 @@ void CodeTextEditor::update_editor_settings() { // Appearance: Whitespace text_editor->set_draw_tabs(EDITOR_GET("text_editor/appearance/whitespace/draw_tabs")); text_editor->set_draw_spaces(EDITOR_GET("text_editor/appearance/whitespace/draw_spaces")); + text_editor->add_theme_constant_override("line_spacing", EDITOR_GET("text_editor/appearance/whitespace/line_spacing")); // Behavior: Navigation text_editor->set_scroll_past_end_of_file_enabled(EDITOR_GET("text_editor/behavior/navigation/scroll_past_end_of_file"));