diff options
author | Damiano Galassi <[email protected]> | 2015-10-13 19:19:20 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2015-10-13 19:19:20 +0200 |
commit | f595da9c952df3ce90b169a245dcd712a8a58be0 (patch) | |
tree | 585a9bbc43692fa9ea42aa7dfa502ed17d137aa4 /macosx/HBPicture.m | |
parent | 1b8ff2bb17489ebadca609d91af2bde286fa69a2 (diff) |
MacGui: save and read the pixel aspect ratio from a preset
Diffstat (limited to 'macosx/HBPicture.m')
-rw-r--r-- | macosx/HBPicture.m | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/macosx/HBPicture.m b/macosx/HBPicture.m index b68c74f78..e254c30d6 100644 --- a/macosx/HBPicture.m +++ b/macosx/HBPicture.m @@ -569,6 +569,7 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; - (void)writeToPreset:(HBMutablePreset *)preset { preset[@"PictureKeepRatio"] = @(self.keepDisplayAspect); + preset[@"PictureModulus"] = @(self.modulus); switch (self.anamorphicMode) { case HB_ANAMORPHIC_NONE: @@ -588,7 +589,9 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; break; } - preset[@"PictureModulus"] = @(self.modulus); + // PAR + preset[@"PicturePARWidth"] = @(self.parWidth); + preset[@"PicturePARHeight"] = @(self.parHeight); // Set crop settings preset[@"PictureAutoCrop"] = @(self.autocrop); @@ -610,6 +613,8 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; */ int maxWidth = self.sourceWidth - self.cropLeft - self.cropRight; int maxHeight = self.sourceHeight - self.cropTop - self.cropBottom; + int parWidth = self.parWidth; + int parHeight = self.parHeight; int jobMaxWidth = 0, jobMaxHeight = 0; /* Check to see if the objectForKey:@"UsesPictureSettings is greater than 0, as 0 means use picture sizing "None" @@ -668,6 +673,8 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; else if ([preset[@"PicturePAR"] isEqualToString:@"custom"]) { self.anamorphicMode = HB_ANAMORPHIC_CUSTOM; + parWidth = [preset[@"PicturePARWidth"] intValue]; + parHeight = [preset[@"PicturePARHeight"] intValue]; } else { @@ -726,7 +733,7 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; uiGeo.geometry.width = self.width; uiGeo.geometry.height = self.height; - hb_rational_t par = {self.parWidth, self.parHeight}; + hb_rational_t par = {parWidth, parHeight}; uiGeo.geometry.par = par; uiGeo.maxWidth = jobMaxWidth; |