Skip to content

Commit

Permalink
MacGui: select the feature title instead of the first title after a s…
Browse files Browse the repository at this point in the history
…can.
  • Loading branch information
galad87 committed May 27, 2016
1 parent 6179ee6 commit a34b503
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions macosx/HBController.m
Original file line number Diff line number Diff line change
Expand Up @@ -577,18 +577,6 @@ - (void)scanURL:(NSURL *)fileURL titleIndex:(NSUInteger)index completionHandler:
fSrcDVD2Field.stringValue = displayName;

[fSrcTitlePopUp addItemWithTitle:title.description];

// See if this is the main feature according
if (title.isFeatured)
{
[fSrcTitlePopUp selectItemWithTitle:title.description];
}
}

// Select the first item is nothing is selected
if (!fSrcTitlePopUp.selectedItem)
{
[fSrcTitlePopUp selectItemAtIndex:0];
}

completionHandler(self.core.titles);
Expand All @@ -609,7 +597,16 @@ - (void)openURL:(NSURL *)fileURL titleIndex:(NSUInteger)index
{
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:fileURL];

HBJob *job = [self jobFromTitle:titles.firstObject];
HBTitle *featuredTitle = titles.firstObject;
for (HBTitle *title in titles)
{
if (title.isFeatured)
{
featuredTitle = title;
}
}

HBJob *job = [self jobFromTitle:featuredTitle];
self.job = job;
}];
}
Expand Down Expand Up @@ -716,6 +713,9 @@ - (void)setJob:(HBJob *)job

HBTitle *title = job.title;

// Update the title selection popup.
[fSrcTitlePopUp selectItemWithTitle:title.description];

// If we are a stream type and a batch scan, grok the output file name from title->name upon title change
if (title.isStream && self.core.titles.count > 1)
{
Expand Down

0 comments on commit a34b503

Please sign in to comment.