Solving issue 1001: "Auto WB is saved as Custom in profile files" and 929: "Crash on image open with WB method = Auto" with a different workaround

This commit is contained in:
natureh
2012-01-11 02:06:23 +01:00
parent db32301fa7
commit b5bf0a8c88
8 changed files with 81 additions and 63 deletions

View File

@@ -354,6 +354,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {
imageListener->setImage (previmg, scale, params.crop);
}
if (imageListener)
// TODO: The WB tool should be advertised too in order to get the AutoWB's temp and green values
imageListener->imageReady (params.crop);
readyphase++;
@@ -487,9 +488,9 @@ void ImProcCoordinator::progress (Glib::ustring str, int pr) {
}*/
}
void ImProcCoordinator::getAutoWB (double& temp, double& green) {
bool ImProcCoordinator::getAutoWB (double& temp, double& green) {
if (imgsrc) {
if (imgsrc && imgsrc->isWBProviderReady()) {
if (!awbComputed) {
minit.lock ();
autoWB = imgsrc->getAutoWB ();
@@ -498,6 +499,12 @@ void ImProcCoordinator::getAutoWB (double& temp, double& green) {
}
temp = autoWB.getTemp ();
green = autoWB.getGreen ();
return true;
}
else {
temp = -1.0;
green = -1.0;
return false;
}
}