mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Keep pathComponentCell and pathItems in sync
This commit is contained in:
parent
093844bb9a
commit
44cacc7766
1 changed files with 13 additions and 0 deletions
|
@ -233,6 +233,19 @@ static Class pathCellClass;
|
|||
|
||||
- (void) setPathItems: (NSArray *)items
|
||||
{
|
||||
NSEnumerator *en = [items objectEnumerator];
|
||||
NSMutableArray *array = [NSMutableArray arrayWithCapacity: [items count]];
|
||||
NSPathControlItem *item = nil;
|
||||
|
||||
while ((item = [en nextObject]) != nil)
|
||||
{
|
||||
NSPathComponentCell *cell = [[NSPathComponentCell alloc] init];
|
||||
[cell setImage: [item image]];
|
||||
[cell setURL: [item URL]];
|
||||
[array addObject: cell];
|
||||
}
|
||||
|
||||
[self setPathComponentCells: array];
|
||||
ASSIGNCOPY(_pathItems, items);
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue