updated logic for displaying lens correction crop factor warning

This commit is contained in:
Alberto Griggio
2017-09-13 14:51:16 +02:00
parent f2853d8742
commit b5c1293bf3

View File

@@ -247,7 +247,9 @@ void LensProfilePanel::updateLensfunWarning()
return;
}
LFLens l = db->findLens(LFCamera(), (*itl)[lf->lensfunModelLens.lens]);
if (l.getCropFactor() - c.getCropFactor() >= 0.01) {
float lenscrop = l.getCropFactor();
float camcrop = c.getCropFactor();
if (lenscrop <= 0 || camcrop <= 0 || lenscrop / camcrop >= 1.01f) {
warning->show();
}
ckbUseVign->set_sensitive(l.hasVignettingCorrection());