From a0a7efd4e7addc7f6162d179b1895d132851a509 Mon Sep 17 00:00:00 2001 From: jdc Date: Sat, 21 Dec 2013 08:01:37 +0100 Subject: [PATCH] Fixed crash when using Spot WB on image edges issue 1903 --- rtgui/toolpanelcoord.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index 8fae98340..495f056a1 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -428,14 +428,21 @@ void ToolPanelCoordinator::spotWBselected (int x, int y, Thumbnail* thm) { return; // 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+rectgetSpotWB (x, y, whitebalance->getSize (), temp, green); + ipc->getSpotWB (x, y, rect, temp, green); whitebalance->setWB (temp, green); } } + + + void ToolPanelCoordinator::autoCropRequested () { if (!ipc)