]> granicus.if.org Git - handbrake/commitdiff
MacGui: Preset cropping
authordynaflash <dynaflashtech@gmail.com>
Tue, 31 Jul 2007 15:10:26 +0000 (15:10 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Tue, 31 Jul 2007 15:10:26 +0000 (15:10 +0000)
- forgot to add the code to revert autocropping back to on and set values if "Source Maximum" was set for a preset in previous commit :)

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@766 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm

index 30b126aae88c35cc1e7dc09270606e62b95fce44..4fab8de1df09efe20b1e18caef58d968c4c830e9 100644 (file)
@@ -2315,18 +2315,24 @@ list = hb_get_titles( fHandle );
    resolves IBActions down to -(void) during compile anyway */
 - (IBAction) RevertPictureSizeToMax: (id) sender
 {
-        hb_job_t * job = fTitle->job;
+       hb_job_t * job = fTitle->job;
        /* We use the output picture width and height
        as calculated from libhb right after title is set
        in TitlePopUpChanged */
        job->width = PicOrigOutputWidth;
        job->height = PicOrigOutputHeight;
-
-
-    
-       [self CalculatePictureSizing: sender];
-       /* We call method method to change UI to reflect whether a preset is used or not*/    
-    [self CustomSettingUsed: sender];
+    [fPicSettingAutoCrop setStringValue: [NSString stringWithFormat:
+               @"%d", 1]];
+       /* Here we use the auto crop values determined right after scan */
+       job->crop[0] = AutoCropTop;
+       job->crop[1] = AutoCropBottom;
+       job->crop[2] = AutoCropLeft;
+       job->crop[3] = AutoCropRight;
+                               
+                               
+                               [self CalculatePictureSizing: sender];
+                               /* We call method method to change UI to reflect whether a preset is used or not*/    
+                               [self CustomSettingUsed: sender];
 }