UI: Remove duplicate subsequent separators in Properties Navbar Tabs

Remove duplicate subsequent separators between tabs in Properties Navbar

Pull Request: https://projects.blender.org/blender/blender/pulls/107693
This commit is contained in:
guishe
2023-06-07 18:01:54 +02:00
committed by Harley Acheson
parent 08d2c17478
commit 67193e4e32

View File

@@ -2047,13 +2047,18 @@ static const EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSE
BLI_assert(totitem <= ARRAY_SIZE(context_tabs_array));
int totitem_added = 0;
bool add_separator = true;
for (int i = 0; i < totitem; i++) {
if (context_tabs_array[i] == -1) {
RNA_enum_item_add_separator(&item, &totitem_added);
if (add_separator) {
RNA_enum_item_add_separator(&item, &totitem_added);
add_separator = false;
}
continue;
}
RNA_enum_items_add_value(&item, &totitem_added, buttons_context_items, context_tabs_array[i]);
add_separator = true;
/* Add the object data icon dynamically for the data tab. */
if (context_tabs_array[i] == BCONTEXT_DATA) {