Summary: | Images without GPS-data are shown on the equator in the geolocation-view | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Michael G. Hansen <mikeml2> |
Component: | Geolocation-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mikeml2 |
Priority: | NOR | ||
Version: | 0.10.0 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 1.0.0 | |
Sentry Crash Report: |
Description
Michael G. Hansen
2009-04-11 22:56:44 UTC
The problem is a missing check for empty positions in libs/imageproperties/imagepropertiessidebardb.cpp where the list of images to be shown on the map is constructed. The changes below fix it. --- imagepropertiessidebardb.cpp.original 2009-03-16 16:28:29.000000000 +0100 +++ imagepropertiessidebardb.cpp 2009-04-11 23:34:30.000000000 +0200 @@ -322,15 +322,25 @@ GPSInfoList list; for (ImageInfoList::const_iterator it = d->currentInfos.constBegin(); it != d->currentInfos.constEnd(); ++it) { - GPSInfo info; - info.latitude = (*it).imagePosition().latitudeNumber(); - info.longitude = (*it).imagePosition().longitudeNumber(); - info.altitude = (*it).imagePosition().altitude(); - info.dateTime = (*it).dateTime(); - info.url = (*it).fileUrl(); - list.append(info); + if (!(*it).imagePosition().isEmpty()) + { + GPSInfo info; + info.latitude = (*it).imagePosition().latitudeNumber(); + info.longitude = (*it).imagePosition().longitudeNumber(); + info.altitude = (*it).imagePosition().altitude(); + info.dateTime = (*it).dateTime(); + info.url = (*it).fileUrl(); + list.append(info); + } + } + if (list.isEmpty()) + { + m_gpsTab->setCurrentURL(); + } + else + { + m_gpsTab->setGPSInfoList(list); } - m_gpsTab->setGPSInfoList(list); m_dirtyGpsTab = true; } SVN commit 952618 by cgilles: apply patch from Michael G.Hansen BUG: 189413 M +22 -12 imagepropertiessidebardb.cpp M +2 -2 imagepropertiessidebardb.h WebSVN link: http://websvn.kde.org/?view=rev&revision=952618 |