diff options
author | dynaflash <[email protected]> | 2010-02-12 20:11:21 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-02-12 20:11:21 +0000 |
commit | b5c930afe507794fdb0ea44fef397caddb218ccc (patch) | |
tree | 8f97ae48f79a5c4552a458cd101cdb639e499eb3 /macosx/PictureController.m | |
parent | 9781f959ca6d14c7f551df2abd773b230326031a (diff) |
MacGui: Fix issue where switching modulus would not properly recalibrate the exisiting pic size, only change the stepper increments.
- Bug found and fix tested by BradleyS.
- Do a dry run of hb_fix_aspect to reset dimensions as per the modulus before running through the rest of the settings.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3117 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/PictureController.m')
-rw-r--r-- | macosx/PictureController.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/macosx/PictureController.m b/macosx/PictureController.m index b02dab729..19b3c0acf 100644 --- a/macosx/PictureController.m +++ b/macosx/PictureController.m @@ -651,6 +651,25 @@ { [fModulusLabel setHidden:NO]; [fModulusPopUp setHidden:NO]; + if (sender == fModulusPopUp) + { + /* do a dry run with hb_fix aspect to get new modulus */ + job->modulus = [[fModulusPopUp titleOfSelectedItem] intValue]; + job->keep_ratio = 1; + hb_fix_aspect( job, HB_KEEP_WIDTH ); + if( job->height > fTitle->height ) + { + job->height = fTitle->height; + hb_fix_aspect( job, HB_KEEP_HEIGHT ); + } + [fWidthStepper setIntValue: job->width]; + [fWidthField setIntValue: job->width]; + if( [fAnamorphicPopUp indexOfSelectedItem] != 2) // if we are not loose or custom + { + [fHeightStepper setIntValue: job->height]; + [fHeightField setIntValue: job->height]; + } + } } else { |