Version: 0.10.0 (using KDE 4.2.2) OS: Linux Installed from: Debian testing/unstable Packages When images with GPS-information and without GPS-information are selected at the same time and the "Geolocation"-tab is opened, images without GPS-information are shown on the equator at 0,0. The images with GPS-information are shown correctly. The right behavior would be not to show the images without GPS-information. When only one image is selected, and the image is without GPS-information, it is not shown on the map, as expected.
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