summaryrefslogtreecommitdiffstats
path: root/macosx/HBPresetsViewController.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-08-17 06:10:35 +0000
committerritsuka <[email protected]>2014-08-17 06:10:35 +0000
commit4c859fbdbadb78cc822f6a5437444e3615d95e2d (patch)
treebfbcd99d792d509c76ea5e03cea7e5edfa1d7f66 /macosx/HBPresetsViewController.m
parentfe03ece379b5ceaeb25f5fe566434c864cbdeb3b (diff)
MacGui: changed the preset selection code a little bit again.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6304 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPresetsViewController.m')
-rw-r--r--macosx/HBPresetsViewController.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/macosx/HBPresetsViewController.m b/macosx/HBPresetsViewController.m
index 08e03e31e..a5cb8c6ad 100644
--- a/macosx/HBPresetsViewController.m
+++ b/macosx/HBPresetsViewController.m
@@ -65,7 +65,7 @@
// Re-expand the items
[self expandNodes:[self.treeController.arrangedObjects childNodes]];
- [self deselect];
+ [self.treeController setSelectionIndexPath:[self.presets indexPathOfPreset:self.presets.defaultPreset]];
}
- (BOOL)validateUserInterfaceItem:(id < NSValidatedUserInterfaceItem >)anItem
@@ -94,7 +94,7 @@
- (IBAction)clicked:(id)sender
{
- if (self.delegate && [[self.treeController.selectedObjects firstObject] isLeaf] && self.enabled)
+ if (self.delegate && [[self.treeController.selectedObjects firstObject] isLeaf])
{
[self.delegate selectionDidChange];
}
@@ -159,14 +159,13 @@
[self.treeController setSelectionIndexPath:nil];
}
-- (void)selectPreset:(HBPreset *)preset
+- (void)setSelection:(HBPreset *)preset
{
NSIndexPath *idx = [self.presets indexPathOfPreset:preset];
if (idx)
{
[self.treeController setSelectionIndexPath:idx];
- [self clicked:self];
}
}