OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / macosx / Controller.m
index 2b81d31..8c0df13 100644 (file)
@@ -2760,8 +2760,10 @@ fWorkingCount = 0;
         [self writeToActivityLog: "applyQueueSettingsToMainWindow: queue item found"];
     }
     /* Set title number and chapters */
-    /* since the queue only scans a single title, we really don't need to pick a title */
-    [fSrcTitlePopUp selectItemAtIndex: [[queueToApply objectForKey:@"TitleNumber"] intValue] - 1];
+    /* since the queue only scans a single title, its already been selected in showNewScan
+       so do not try to reset it here. However if we do decide to do full source scans on
+       a queue edit rescan, we would need it. So leaving in for now but commenting out. */
+    //[fSrcTitlePopUp selectItemAtIndex: [[queueToApply objectForKey:@"TitleNumber"] intValue] - 1];
     
     [fSrcChapterStartPopUp selectItemAtIndex: [[queueToApply objectForKey:@"ChapterStart"] intValue] - 1];
     [fSrcChapterEndPopUp selectItemAtIndex: [[queueToApply objectForKey:@"ChapterEnd"] intValue] - 1];
@@ -4463,19 +4465,17 @@ bool one_burned = FALSE;
     hb_title_t * title = (hb_title_t*)
         hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] );
 
-    /* If we are a stream type, grok the output file name from title->name upon title change */
-    if (title->type == HB_STREAM_TYPE)
+    /* If we are a stream type and a batch scan, grok the output file name from title->name upon title change */
+    if (title->type == HB_STREAM_TYPE && hb_list_count( list ) > 1 )
     {
         /* we set the default name according to the new title->name */
         [fDstFile2Field setStringValue: [NSString stringWithFormat:
                                          @"%@/%@.%@", [[fDstFile2Field stringValue] stringByDeletingLastPathComponent],
                                          [NSString stringWithUTF8String: title->name],
                                          [[fDstFile2Field stringValue] pathExtension]]];
-        /* If we have more than one title and are stream then we have a batch, change the source to read out the parent folder also */
-        if ( hb_list_count( list ) > 1 )
-        {                                  
-            [fSrcDVD2Field setStringValue:[NSString stringWithFormat:@"%@/%@", browsedSourceDisplayName,[NSString stringWithUTF8String: title->name]]];
-        }
+        
+        /* Change the source to read out the parent folder also */
+        [fSrcDVD2Field setStringValue:[NSString stringWithFormat:@"%@/%@", browsedSourceDisplayName,[NSString stringWithUTF8String: title->name]]];
     }
     
     /* For point a to point b pts encoding, set the start and end fields to 0 and the title duration in seconds respectively */