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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user