summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-08-27 21:56:14 +0200
committerGitHub <noreply@github.com>2022-08-27 21:56:14 +0200
commitd3db8bbebddc61d07179bc1acc27853813e7a2a0 (patch)
tree7deb731fd025f8c80dd362753a9821724aeb6e29 /editor/plugins/script_text_editor.cpp
parentc7b5c908814b830ad04c4e54c1e36da3a18aa52c (diff)
parent4b817a565cab8af648c88cfc7ab6481e86ee3625 (diff)
downloadredot-engine-d3db8bbebddc61d07179bc1acc27853813e7a2a0.tar.gz
Merge pull request #62846 from AaronRecord/remove_redundant_theme_updates_in_enter_tree
Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 5e7db17edf..421b258f49 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1392,7 +1392,11 @@ void ScriptTextEditor::_change_syntax_highlighter(int p_idx) {
void ScriptTextEditor::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_THEME_CHANGED:
+ case NOTIFICATION_ENTER_TREE: {
+ code_editor->get_text_editor()->set_gutter_width(connection_gutter, code_editor->get_text_editor()->get_line_height());
+ } break;
+
+ case NOTIFICATION_THEME_CHANGED: {
if (!editor_enabled) {
break;
}
@@ -1400,9 +1404,6 @@ void ScriptTextEditor::_notification(int p_what) {
_update_warnings();
_update_errors();
}
- [[fallthrough]];
- case NOTIFICATION_ENTER_TREE: {
- code_editor->get_text_editor()->set_gutter_width(connection_gutter, code_editor->get_text_editor()->get_line_height());
} break;
}
}