[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [marble] src/plugins/runner/osm: let the marbleZoomLevel tag have the last word about the zoom level
From:       Bernhard Beschow <bbeschow () cs ! tu-berlin ! de>
Date:       2016-11-06 21:30:37
Message-ID: E1c3V1R-0005Wu-2D () code ! kde ! org
[Download RAW message or body]

Git commit f76b677d4bec06bbeec95b7bf122f146008d1af3 by Bernhard Beschow.
Committed on 06/11/2016 at 21:27.
Pushed by beschow into branch 'master'.

let the marbleZoomLevel tag have the last word about the zoom level of an OSM node

M  +6    -8    src/plugins/runner/osm/OsmNode.cpp

http://commits.kde.org/marble/f76b677d4bec06bbeec95b7bf122f146008d1af3

diff --git a/src/plugins/runner/osm/OsmNode.cpp b/src/plugins/runner/osm/OsmNode.cpp
index 3f839b5..42b4c79 100644
--- a/src/plugins/runner/osm/OsmNode.cpp
+++ b/src/plugins/runner/osm/OsmNode.cpp
@@ -63,14 +63,7 @@ void OsmNode::create(GeoDataDocument *document) const
     }
     placemark->setVisualCategory(category);
     placemark->setStyle( GeoDataStyle::Ptr() );
-
-    if (m_osmData.containsTagKey(QLatin1String("marbleZoomLevel"))) {
-        int const zoomLevel = m_osmData.tagValue(QLatin1String("marbleZoomLevel")).toInt();
-        placemark->setZoomLevel(zoomLevel);
-    } else {
-        placemark->setZoomLevel(zoomLevelFor(category, 18));
-    }
-
+    placemark->setZoomLevel(zoomLevelFor(category, 18));
     placemark->setPopularity(popularityFor(category, 100));
 
     if (category >= GeoDataPlacemark::PlaceCity && category <= GeoDataPlacemark::PlaceVillageCapital) {
@@ -82,6 +75,11 @@ void OsmNode::create(GeoDataDocument *document) const
         }
     }
 
+    if (m_osmData.containsTagKey(QLatin1String("marbleZoomLevel"))) {
+        int const zoomLevel = m_osmData.tagValue(QLatin1String("marbleZoomLevel")).toInt();
+        placemark->setZoomLevel(zoomLevel);
+    }
+
     OsmObjectManager::registerId(m_osmData.id());
     document->append(placemark);
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic