]> granicus.if.org Git - handbrake/commitdiff
MacGui: fixed crop ui enabled status after reloading a queue item.
authorritsuka <damiog@gmail.com>
Tue, 11 Nov 2014 13:03:28 +0000 (13:03 +0000)
committerritsuka <damiog@gmail.com>
Tue, 11 Nov 2014 13:03:28 +0000 (13:03 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6511 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/PictureController.m

index 6fd2f47431a3a0285ad2ee4051e4d8f68c6dd935..cfb34049b0516fc19d844986861b1b5e267f7702 100644 (file)
@@ -243,32 +243,11 @@ static void *HBPictureControllerContext = &HBPictureControllerContext;
         [fWidthStepper  setIncrement: 16];
         [fHeightStepper setIncrement: 16];
     }
-    if (!self.autoCrop)
-    {
-        [fCropMatrix  selectCellAtRow: 1 column:0];
-        [fCropTopStepper    setIntValue: job->crop[0]];
-        [fCropTopField      setIntValue: job->crop[0]];
-        [fCropBottomStepper setIntValue: job->crop[1]];
-        [fCropBottomField   setIntValue: job->crop[1]];
-        [fCropLeftStepper   setIntValue: job->crop[2]];
-        [fCropLeftField     setIntValue: job->crop[2]];
-        [fCropRightStepper  setIntValue: job->crop[3]];
-        [fCropRightField    setIntValue: job->crop[3]];
-    }
-    else
+
+    if (self.autoCrop)
     {
         [fCropMatrix  selectCellAtRow: 0 column:0];
 
-        [fCropTopStepper    setEnabled: !self.autoCrop];
-        [fCropBottomStepper setEnabled: !self.autoCrop];
-        [fCropLeftStepper   setEnabled: !self.autoCrop];
-        [fCropRightStepper  setEnabled: !self.autoCrop];
-
-        [fCropTopField      setEditable: !self.autoCrop];
-        [fCropBottomField   setEditable: !self.autoCrop];
-        [fCropLeftField     setEditable: !self.autoCrop];
-        [fCropRightField    setEditable: !self.autoCrop];
-
         /* If auto, lets set the crop steppers according to
          * current fTitle->crop values */
         memcpy( job->crop, fTitle->crop, 4 * sizeof( int ) );
@@ -281,6 +260,29 @@ static void *HBPictureControllerContext = &HBPictureControllerContext;
         [fCropRightStepper  setIntValue: fTitle->crop[3]];
         [fCropRightField    setIntValue: fTitle->crop[3]];
     }
+    else
+    {
+        [fCropMatrix  selectCellAtRow: 1 column:0];
+        [fCropTopStepper    setIntValue: job->crop[0]];
+        [fCropTopField      setIntValue: job->crop[0]];
+        [fCropBottomStepper setIntValue: job->crop[1]];
+        [fCropBottomField   setIntValue: job->crop[1]];
+        [fCropLeftStepper   setIntValue: job->crop[2]];
+        [fCropLeftField     setIntValue: job->crop[2]];
+        [fCropRightStepper  setIntValue: job->crop[3]];
+        [fCropRightField    setIntValue: job->crop[3]];
+    }
+
+    [fCropTopStepper    setEnabled: !self.autoCrop];
+    [fCropBottomStepper setEnabled: !self.autoCrop];
+    [fCropLeftStepper   setEnabled: !self.autoCrop];
+    [fCropRightStepper  setEnabled: !self.autoCrop];
+
+    [fCropTopField      setEditable: !self.autoCrop];
+    [fCropBottomField   setEditable: !self.autoCrop];
+    [fCropLeftField     setEditable: !self.autoCrop];
+    [fCropRightField    setEditable: !self.autoCrop];
+
     [fWidthStepper      setMaxValue: title->width - job->crop[2] - job->crop[3]];
     [fWidthStepper      setIntValue: job->width];
     [fWidthField        setIntValue: job->width];