mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-26 03:01:57 +00:00
Move handling of dictionary creation into GSControllerTreeProxy class, per discussion with @fredkiefer
This commit is contained in:
parent
abfc782a6c
commit
6f2c542b46
3 changed files with 19 additions and 14 deletions
|
@ -192,9 +192,8 @@
|
|||
|
||||
if ([_content isKindOfClass: [NSArray class]])
|
||||
{
|
||||
NSMutableDictionary *dictionary = [GSControllerTreeProxy dictionaryWithChildren: _content];
|
||||
_arranged_objects = [[GSControllerTreeProxy alloc] initWithRepresentedObject: dictionary
|
||||
withController: self];
|
||||
_arranged_objects = [[GSControllerTreeProxy alloc] initWithContent: _content
|
||||
withController: self];
|
||||
}
|
||||
|
||||
[self didChangeValueForKey: @"arrangedObjects"];
|
||||
|
@ -278,8 +277,8 @@
|
|||
{
|
||||
NSMutableArray *newContent = [NSMutableArray arrayWithArray: [self content]];
|
||||
GSControllerTreeProxy *node = [[GSControllerTreeProxy alloc]
|
||||
initWithRepresentedObject: newObject
|
||||
withController: self];
|
||||
initWithContent: newObject
|
||||
withController: self];
|
||||
|
||||
[newContent addObject: node];
|
||||
|
||||
|
@ -294,7 +293,10 @@
|
|||
NSIndexPath *p = [self selectionIndexPath];
|
||||
id newObject = [self newObject];
|
||||
|
||||
[self insertObject: newObject atArrangedObjectIndexPath: p];
|
||||
if (p != nil)
|
||||
{
|
||||
[self insertObject: newObject atArrangedObjectIndexPath: p];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction) remove: (id)sender
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue