From b5c1293bf3b5ad77c0f2a8f3a3cbbcd556ab8b85 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Wed, 13 Sep 2017 14:51:16 +0200 Subject: [PATCH] updated logic for displaying lens correction crop factor warning --- rtgui/lensprofile.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index c2dde09b5..bb9138461 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -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());