From 25762cfc44591c66bc77fba4b6fc5597b0d44532 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Tue, 11 Nov 2014 13:03:28 +0000 Subject: MacGui: fixed crop ui enabled status after reloading a queue item. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6511 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/PictureController.m | 48 ++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'macosx/PictureController.m') diff --git a/macosx/PictureController.m b/macosx/PictureController.m index 6fd2f4743..cfb34049b 100644 --- a/macosx/PictureController.m +++ b/macosx/PictureController.m @@ -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]; -- cgit v1.2.3