Merge pull request #61071 from timothyqiu/leading-stylebox

This commit is contained in:
Rémi Verschelde 2022-05-16 13:47:39 +02:00 committed by GitHub
commit 75e4d24ace
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}