Commit 81dfd7dc authored by Maik Qualmann's avatar Maik Qualmann
Browse files

use default value for object distance when not available

CCBUGS: 303848
parent 9009bb78
......@@ -424,23 +424,21 @@ LensFunIface::MetadataMatch LensFunIface::findFromMetadata(const DMetadata& meta
if (temp.isEmpty())
{
qCDebug(DIGIKAM_DIMG_LOG) << "Subject dist. : NOT FOUND";
exactMatch &= false;
qCDebug(DIGIKAM_DIMG_LOG) << "Subject dist. : NOT FOUND : Use default value.";
temp = QLatin1String("1000");
}
else
{
temp = temp.remove(QLatin1String(" m"));
bool ok;
d->settings.subjectDistance = temp.toDouble(&ok);
if(!ok)
{
d->settings.subjectDistance = -1.0;
}
temp = temp.remove(QLatin1String(" m"));
bool ok;
d->settings.subjectDistance = temp.toDouble(&ok);
qCDebug(DIGIKAM_DIMG_LOG) << "Subject dist. : " << d->settings.subjectDistance;
if (!ok)
{
d->settings.subjectDistance = -1.0;
}
qCDebug(DIGIKAM_DIMG_LOG) << "Subject dist. : " << d->settings.subjectDistance;
// ------------------------------------------------------------------------------------------------
ret = exactMatch ? MetadataExactMatch : MetadataPartialMatch;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment