diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-10-19 18:05:19 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-10-19 18:14:14 +0200 |
commit | 215e036600809fd588ec67b8d39efe12ae1ff4c5 (patch) | |
tree | 2ca6a6cf9df7071a6026f50852a9f3e4894e6518 /editor/editor_properties.cpp | |
parent | f8818f85e6c43cdf1277e8ae85eba19ca0a003b0 (diff) | |
download | redot-engine-215e036600809fd588ec67b8d39efe12ae1ff4c5.tar.gz |
Add bulk change guards to successive theme overrides in Editor and GUI
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r-- | editor/editor_properties.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 0be23fa3cc..7884005ab7 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -3268,6 +3268,7 @@ void EditorPropertyResource::_update_property_bg() { updating_theme = true; + begin_bulk_theme_override(); if (sub_inspector != nullptr) { int count_subinspectors = 0; Node *n = get_parent(); @@ -3283,7 +3284,6 @@ void EditorPropertyResource::_update_property_bg() { add_theme_color_override("property_color", get_theme_color(SNAME("sub_inspector_property_color"), EditorStringName(Editor))); add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), EditorStringName(Editor))); add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), EditorStringName(Editor))); - add_theme_constant_override("v_separation", 0); } else { add_theme_color_override("property_color", get_theme_color(SNAME("property_color"), SNAME("EditorProperty"))); @@ -3291,6 +3291,7 @@ void EditorPropertyResource::_update_property_bg() { add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("EditorProperty"))); add_theme_constant_override("v_separation", get_theme_constant(SNAME("v_separation"), SNAME("EditorProperty"))); } + end_bulk_theme_override(); updating_theme = false; queue_redraw(); @@ -3483,7 +3484,6 @@ void EditorPropertyResource::fold_resource() { void EditorPropertyResource::_notification(int p_what) { switch (p_what) { - case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { if (!updating_theme) { _update_property_bg(); |