summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-03-06 14:56:32 +0000
committerdynaflash <[email protected]>2008-03-06 14:56:32 +0000
commit5c1ba114dd3c868c4f9f3a5be5395387acc72692 (patch)
tree2a2f5859399bf223ca7d9e48d759bef0edbbe2f0
parent4b3169b04dbc66e41af3ae8c38cf7b986215b610 (diff)
MacGui: Fix issue where renaming a preset does not reflect the new name immediately in the preset drawer
- call [fPresetsOutlineView reloadData]; - use "-sortPresets" method instead of sorting it in its own method git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1330 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.mm17
1 files changed, 5 insertions, 12 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 719acad1b..5ff4fe7d4 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -3298,7 +3298,7 @@ if (item == nil)
}
/* We use this to edit the name field in the outline view */
-- (void)outlineView:(NSOutlineView *)fPresetsOutlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
+- (void)outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
{
if ([[tableColumn identifier] isEqualToString:@"PresetName"])
{
@@ -3306,17 +3306,10 @@ if (item == nil)
theRecord = item;
[theRecord setObject:object forKey:@"PresetName"];
- /* We Sort the Presets By Factory or Custom */
- NSSortDescriptor * presetTypeDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"Type"
- ascending:YES] autorelease];
- /* We Sort the Presets Alphabetically by name */
- NSSortDescriptor * presetNameDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"PresetName"
- ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease];
- NSArray *sortDescriptors=[NSArray arrayWithObjects:presetTypeDescriptor,presetNameDescriptor,nil];
- NSArray *sortedArray=[UserPresets sortedArrayUsingDescriptors:sortDescriptors];
- [UserPresets setArray:sortedArray];
- /* We Reload the New Table data for presets */
- //[fPresetsOutlineView reloadData];
+
+ [self sortPresets];
+
+ [fPresetsOutlineView reloadData];
/* We save all of the preset data here */
[self savePreset];
}