summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-11-06 21:11:23 (GMT)
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-11-06 21:17:10 (GMT)
commit8483e5f322babb7f7f4a0eb723c3a5de76a02eb1 (patch)
tree50df5f0bf057fbf58957f4cd1c2bacfa65ff6a99
parentc65a2f35314f9f81658c121cd0713cff79f858bb (diff)
establish invariant: set a popularity in any case also for OSM nodes
-rw-r--r--src/plugins/runner/osm/OsmNode.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/runner/osm/OsmNode.cpp b/src/plugins/runner/osm/OsmNode.cpp
index 68bbff3..3f839b5 100644
--- a/src/plugins/runner/osm/OsmNode.cpp
+++ b/src/plugins/runner/osm/OsmNode.cpp
@@ -69,9 +69,10 @@ void OsmNode::create(GeoDataDocument *document) const
placemark->setZoomLevel(zoomLevel);
} else {
placemark->setZoomLevel(zoomLevelFor(category, 18));
- placemark->setPopularity(popularityFor(category, 100));
}
+ placemark->setPopularity(popularityFor(category, 100));
+
if (category >= GeoDataPlacemark::PlaceCity && category <= GeoDataPlacemark::PlaceVillageCapital) {
int const population = m_osmData.tagValue(QStringLiteral("population")).toInt();
placemark->setPopulation(qMax(0, population));