diff options
author | Damiano Galassi <[email protected]> | 2016-03-09 19:16:40 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-03-09 19:16:40 +0100 |
commit | 96c02dd6f256f4a4e74f8962f56502d28e5e65a3 (patch) | |
tree | 44433165a1403802be62d6072a3a3963913e92d9 /macosx | |
parent | 6dfc9c4a5a5d9a7bc56d9b10756e3b66a5887069 (diff) |
MacGui: use the kvc accessor methods, so that the presets menu will update properly after a change in the presets.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBPresetsManager.m | 4 | ||||
-rw-r--r-- | macosx/HBTreeNode.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/macosx/HBPresetsManager.m b/macosx/HBPresetsManager.m index aa78455ff..f897742a1 100644 --- a/macosx/HBPresetsManager.m +++ b/macosx/HBPresetsManager.m @@ -75,7 +75,7 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification"; for (HBPreset *preset in oldPresets.children) { - [self.root.children addObject:preset]; + [self.root insertObject:preset inChildrenAtIndex:self.root.countOfChildren]; } } @@ -209,7 +209,7 @@ typedef NS_ENUM(NSUInteger, HBPresetLoadingResult) { { for (NSDictionary *child in presetsDict[@"PresetList"]) { - [self.root.children addObject:[[HBPreset alloc] initWithDictionary:child]]; + [self.root insertObject:[[HBPreset alloc] initWithDictionary:child] inChildrenAtIndex:self.root.countOfChildren]; } if (result == HBPresetLoadingResultOKUpgraded) diff --git a/macosx/HBTreeNode.h b/macosx/HBTreeNode.h index be40a6125..4b0afcb12 100644 --- a/macosx/HBTreeNode.h +++ b/macosx/HBTreeNode.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Notify a delegate that something changed in the tree. - * KVO observing a tree looked complicated an expensive, so this is a lightweight + * KVO observing a tree looks complicated and expensive, so this is a lightweight * way to track the changes we need to know. */ @protocol HBTreeNodeDelegate <NSObject> |