Fix issue #407
This commit is contained in:
@@ -352,11 +352,6 @@ void Crop::trim (ProcParams* pp, int ow, int oh) {
|
|||||||
int xmin = pp->crop.x;
|
int xmin = pp->crop.x;
|
||||||
int ymin = pp->crop.y;
|
int ymin = pp->crop.y;
|
||||||
|
|
||||||
if (pp->coarse.rotate == 90 || pp->coarse.rotate == 270) {
|
|
||||||
int tmp = oh;
|
|
||||||
oh = ow;
|
|
||||||
ow = tmp;
|
|
||||||
}
|
|
||||||
if (xmin > ow || ymin > oh) {
|
if (xmin > ow || ymin > oh) {
|
||||||
// the crop is completely out of the image, so we disable the crop
|
// the crop is completely out of the image, so we disable the crop
|
||||||
pp->crop.enabled = false;
|
pp->crop.enabled = false;
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include <toolpanelcoord.h>
|
#include <toolpanelcoord.h>
|
||||||
#include <ilabel.h>
|
#include <ilabel.h>
|
||||||
#include <options.h>
|
#include <options.h>
|
||||||
|
#include <imagesource.h>
|
||||||
|
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
@@ -217,12 +218,21 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
|||||||
|
|
||||||
void ToolPanelCoordinator::profileChange (const ProcParams *nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited) {
|
void ToolPanelCoordinator::profileChange (const ProcParams *nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited) {
|
||||||
|
|
||||||
|
int fw, fh, tr;
|
||||||
|
|
||||||
if (!ipc) return;
|
if (!ipc) return;
|
||||||
ProcParams *params = ipc->getParamsForUpdate (event);
|
ProcParams *params = ipc->getParamsForUpdate (event);
|
||||||
*params = *nparams;
|
*params = *nparams;
|
||||||
|
|
||||||
|
tr = TR_NONE;
|
||||||
|
if (params->coarse.rotate==90) tr |= TR_R90;
|
||||||
|
if (params->coarse.rotate==180) tr |= TR_R180;
|
||||||
|
if (params->coarse.rotate==270) tr |= TR_R270;
|
||||||
|
|
||||||
// trimming overflowing cropped area
|
// trimming overflowing cropped area
|
||||||
crop->trim(params, ipc->getFullWidth(), ipc->getFullHeight());
|
rtengine::ImageSource *ii = (rtengine::ImageSource*)ipc->getInitialImage();
|
||||||
|
ii->getFullSize (fw, fh, tr);
|
||||||
|
crop->trim(params, fw, fh);
|
||||||
|
|
||||||
// updating the GUI with updated values
|
// updating the GUI with updated values
|
||||||
for (unsigned int i=0; i<toolPanels.size(); i++)
|
for (unsigned int i=0; i<toolPanels.size(); i++)
|
||||||
|
Reference in New Issue
Block a user