OSDN Git Service

MacGUI: don't reset codecs popup when changing format, if the new format supports...
authorritsuka <ritsuka@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 22 Sep 2007 10:02:03 +0000 (10:02 +0000)
committerritsuka <ritsuka@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 22 Sep 2007 10:02:03 +0000 (10:02 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@977 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm

index 6cf9562..4c6f50c 100644 (file)
@@ -2090,6 +2090,7 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
 - (IBAction) formatPopUpChanged: (id) sender
 {
     NSString * string = [fDstFile2Field stringValue];
+    NSString * selectedCodecs = [fDstCodecsPopUp titleOfSelectedItem];
     int format = [fDstFormatPopUp indexOfSelectedItem];
     char * ext = NULL;
        /* Initially set the large file (64 bit formatting) output checkbox to hidden */
@@ -2176,6 +2177,11 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
                        [fCreateChapterMarkers setEnabled: YES];
                        break;
     }
+    if ( SuccessfulScan ) {
+        [fDstCodecsPopUp selectItemWithTitle:selectedCodecs];
+        if ( [fDstCodecsPopUp selectedItem] == NULL )
+            [fDstCodecsPopUp selectItemAtIndex:0];
+        }
     [self codecsPopUpChanged: NULL];
 
     /* Add/replace to the correct extension */