[Digikam-devel] [Bug 189413] Images without GPS-data are shown on the equator in the geolocation-view

Michael G. Hansen mikeml2 at pfna.de
Sun Apr 12 11:24:47 BST 2009


https://bugs.kde.org/show_bug.cgi?id=189413


Michael G. Hansen <mikeml2 at pfna.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikeml2 at pfna.de




--- Comment #1 from Michael G. Hansen <mikeml2 pfna de>  2009-04-12 12:24:41 ---
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;
         }

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list