Fix Group items

This commit is contained in:
Samuel Attard 2016-12-16 19:27:54 +11:00 committed by Kevin Sawicki
parent 28d5c8bbde
commit ba3fbc9d1b

View file

@ -693,11 +693,13 @@ bool ScopedDisableResize::disable_resize_ = false;
NSMutableArray<NSTouchBarItem*>* generatedItems = [[NSMutableArray alloc] init]; NSMutableArray<NSTouchBarItem*>* generatedItems = [[NSMutableArray alloc] init];
NSMutableArray<NSString*>* identList = [self identifierArrayFromDicts:items]; NSMutableArray<NSString*>* identList = [self identifierArrayFromDicts:items];
for (NSUInteger i = 0; i < [identList count]; i++) { for (NSUInteger i = 0; i < [identList count]; i++) {
if ([identList objectAtIndex:i] != NSTouchBarItemIdentifierOtherItemsProxy) {
NSTouchBarItem* generatedItem = [self makeItemForIdentifier:[identList objectAtIndex:i]]; NSTouchBarItem* generatedItem = [self makeItemForIdentifier:[identList objectAtIndex:i]];
if (generatedItem) { if (generatedItem) {
[generatedItems addObject:generatedItem]; [generatedItems addObject:generatedItem];
} }
} }
}
NSGroupTouchBarItem *groupItem = [NSGroupTouchBarItem groupItemWithIdentifier:identifier items:generatedItems]; NSGroupTouchBarItem *groupItem = [NSGroupTouchBarItem groupItemWithIdentifier:identifier items:generatedItems];
std::string customizationLabel; std::string customizationLabel;