Fixed crash when using Spot WB on image edges issue 1903
This commit is contained in:
@@ -428,14 +428,21 @@ void ToolPanelCoordinator::spotWBselected (int x, int y, Thumbnail* thm) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// toolBar->setTool (TOOL_HAND);
|
// toolBar->setTool (TOOL_HAND);
|
||||||
if (x>0 && y>0) {
|
int rect=whitebalance->getSize ();
|
||||||
|
int ww= ipc->getFullWidth();
|
||||||
|
int hh= ipc->getFullHeight();
|
||||||
|
|
||||||
|
if (x-rect>0 && y-rect>0 && x+rect<ww && y+rect<hh) {
|
||||||
double temp;
|
double temp;
|
||||||
double green;
|
double green;
|
||||||
ipc->getSpotWB (x, y, whitebalance->getSize (), temp, green);
|
ipc->getSpotWB (x, y, rect, temp, green);
|
||||||
whitebalance->setWB (temp, green);
|
whitebalance->setWB (temp, green);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ToolPanelCoordinator::autoCropRequested () {
|
void ToolPanelCoordinator::autoCropRequested () {
|
||||||
|
|
||||||
if (!ipc)
|
if (!ipc)
|
||||||
|
Reference in New Issue
Block a user