diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.h | 1 | ||||
-rw-r--r-- | macosx/Controller.mm | 16 |
2 files changed, 12 insertions, 5 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index 4994e8149..22ce107ae 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -309,6 +309,7 @@ - (IBAction)setDefaultPreset:(id)sender; - (IBAction)selectDefaultPreset:(id)sender; - (void) savePreset; +- (void)sortPresets; - (IBAction)addFactoryPresets:(id)sender; - (IBAction)deleteFactoryPresets:(id)sender; - (IBAction)addUserPreset:(id)sender; diff --git a/macosx/Controller.mm b/macosx/Controller.mm index a64afe76d..719acad1b 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -3737,6 +3737,16 @@ if (item == nil) - (void)addPreset { + [self sortPresets]; + /* We Reload the New Table data for presets */ + [fPresetsOutlineView reloadData]; + /* We save all of the preset data here */ + [self savePreset]; +} + +- (void)sortPresets +{ + /* We Sort the Presets By Factory or Custom */ NSSortDescriptor * presetTypeDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"Type" @@ -3748,11 +3758,7 @@ if (item == nil) NSArray *sortedArray=[UserPresets sortedArrayUsingDescriptors:sortDescriptors]; [UserPresets setArray:sortedArray]; - - /* We Reload the New Table data for presets */ - [fPresetsOutlineView reloadData]; - /* We save all of the preset data here */ - [self savePreset]; + } - (IBAction)insertPreset:(id)sender |