From 2d6f89401df0eac82561d7fbc49312df1dcd3b7a Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 24 Feb 2017 09:26:08 +0100 Subject: [PATCH] MacGui: set a sort descriptor by default in the titles selection table. --- macosx/HBTitleSelectionController.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macosx/HBTitleSelectionController.m b/macosx/HBTitleSelectionController.m index 7ac625f3c..b0f3e088a 100644 --- a/macosx/HBTitleSelectionController.m +++ b/macosx/HBTitleSelectionController.m @@ -66,6 +66,12 @@ return self; } +- (void)windowDidLoad +{ + NSSortDescriptor *mySortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"title.index" ascending:YES]; + self.arrayController.sortDescriptors = [NSArray arrayWithObject:mySortDescriptor]; +} + - (IBAction)deselectAll:(id)sender { for (HBTitleSelection *title in self.titles) -- 2.40.0