diff options
Diffstat (limited to 'macosx/HBPresetsManager.m')
-rw-r--r-- | macosx/HBPresetsManager.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/macosx/HBPresetsManager.m b/macosx/HBPresetsManager.m index 86bd7f4fa..778963b7d 100644 --- a/macosx/HBPresetsManager.m +++ b/macosx/HBPresetsManager.m @@ -229,7 +229,7 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification"; return retValue; } -- (void)addPreset:(NSDictionary *)preset +- (void)addPresetFromDictionary:(NSDictionary *)preset { HBPreset *presetNode = [[HBPreset alloc] initWithName:preset[@"PresetName"] content:preset @@ -241,6 +241,13 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification"; [self savePresets]; } +- (void)addPreset:(HBPreset *)preset +{ + [self.root insertObject:preset inChildrenAtIndex:[self.root countOfChildren]]; + + [self savePresets]; +} + - (void)deletePresetAtIndexPath:(NSIndexPath *)idx { HBPreset *parentNode = self.root; |