diff options
author | dynaflash <[email protected]> | 2008-12-16 15:33:40 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-12-16 15:33:40 +0000 |
commit | 2dc34e0a244cf2168d06ae0bf92d3b10f8cfd20e (patch) | |
tree | a14c35bd3ac83490fefbd9ff88a4757ee595a42f /macosx/Controller.mm | |
parent | 45e2e58bed396259f939f7482d6e7eec31b1a351 (diff) |
MacGui: Fix issue where switching formats causes the video encoder drop down to reset to the first selection, losing your previously chosen encoder.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2034 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r-- | macosx/Controller.mm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index cf5ad3057..2f28702f2 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -3703,6 +3703,10 @@ fWorkingCount = 0; [fDstMp4iPodFileCheck setHidden: YES]; /* Update the Video Codec PopUp */ + /* lets get the tag of the currently selected item first so we might reset it later */ + int selectedVidEncoderTag; + selectedVidEncoderTag = [[fVidEncoderPopUp selectedItem] tag]; + /* Note: we now store the video encoder int values from common.c in the tags of each popup for easy retrieval later */ [fVidEncoderPopUp removeAllItems]; NSMenuItem *menuItem; @@ -3765,7 +3769,15 @@ fWorkingCount = 0; [fCreateChapterMarkers setState: NSOffState]; break; } - [fVidEncoderPopUp selectItemAtIndex: 0]; + /* if we have a previously selected vid encoder tag, then try to select it */ + if (selectedVidEncoderTag) + { + [fVidEncoderPopUp selectItemWithTag: selectedVidEncoderTag]; + } + else + { + [fVidEncoderPopUp selectItemAtIndex: 0]; + } [self audioAddAudioTrackCodecs: fAudTrack1CodecPopUp]; [self audioAddAudioTrackCodecs: fAudTrack2CodecPopUp]; |