diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-16 13:47:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 13:47:39 +0200 |
commit | 75e4d24ace8ed55dea9b86be9333c54fff8dfa1b (patch) | |
tree | 966607d494c6cd5ad3b10851fe387dd8ae5b8f9e /editor/plugins | |
parent | f95b7412c74518a1f34912ba7d129cf247e7c2c1 (diff) | |
parent | 4b013a9c967ecc063801b3d4a0e833dcbc865f83 (diff) |
Merge pull request #61071 from timothyqiu/leading-stylebox
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 41a599e933..7b2c7d2a82 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -3211,11 +3211,13 @@ void ThemeTypeEditor::_update_stylebox_from_leading() { edited_theme->get_stylebox_list(edited_type, &names); List<Ref<StyleBox>> styleboxes; for (const StringName &E : names) { - if (E == leading_stylebox.item_name) { + Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type); + + // Avoid itself, stylebox can be shared between items. + if (sb == leading_stylebox.stylebox) { continue; } - Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type); if (sb->get_class() == leading_stylebox.stylebox->get_class()) { styleboxes.push_back(sb); } |