diff options
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 { |