Fixes Issue 1826, names of non Canon-lenses on Canon-Cams are not correctly shown

This commit is contained in:
Ingo
2013-04-17 23:39:44 +02:00
parent 3d4bd4955d
commit 6bcf4f142d
3 changed files with 6 additions and 2 deletions

View File

@@ -262,7 +262,7 @@ void ImageData::extractInfo () {
lens = "Canon " + ldata;
}
}
if( !found ){
if( !found || lens.substr(lens.find(' ')).length() < 7 ){
lt = mnote->findTag("LensID");
if ( lt ) {
std::string ldata = lt->valueToString ();
@@ -289,7 +289,7 @@ void ImageData::extractInfo () {
}
} else if (exif->getTag ("DNGLensInfo")) {
lens = exif->getTag ("DNGLensInfo")->valueToString ();
} if (exif->getTag ("LensModel")) {
} else if (exif->getTag ("LensModel")) {
lens = exif->getTag ("LensModel")->valueToString ();
} else if (exif->getTag ("LensInfo")) {
lens = exif->getTag ("LensInfo")->valueToString ();