summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-09-07 16:00:11 (GMT)
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-09-07 17:19:47 (GMT)
commit1d9e20ecdee086c654fe9642c446f2c22f54a5e9 (patch)
tree2a0a37749aad2eb6d55ba6f769f1ebb098ef8c74
parentb4a96f1c08f2de8fbf520ca1f6d94e6c1a0b9815 (diff)
pass a GeoDataPlacemark rather than a visual category, so in the future more magic can happen behind the scene
-rw-r--r--src/lib/marble/StyleBuilder.cpp4
-rw-r--r--src/lib/marble/StyleBuilder.h3
-rw-r--r--src/lib/marble/layers/GeometryLayer.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/marble/StyleBuilder.cpp b/src/lib/marble/StyleBuilder.cpp
index 143b1ef..919fe20 100644
--- a/src/lib/marble/StyleBuilder.cpp
+++ b/src/lib/marble/StyleBuilder.cpp
@@ -1568,9 +1568,9 @@ void StyleBuilder::reset()
d->m_defaultStyleInitialized = false;
}
-int StyleBuilder::minimumZoomLevel(GeoDataFeature::GeoDataVisualCategory category) const
+int StyleBuilder::minimumZoomLevel(const GeoDataPlacemark &placemark) const
{
- return d->m_defaultMinZoomLevels[category];
+ return d->m_defaultMinZoomLevels[placemark.visualCategory()];
}
int StyleBuilder::maximumZoomLevel() const
diff --git a/src/lib/marble/StyleBuilder.h b/src/lib/marble/StyleBuilder.h
index 3660b1a..cb55aa8 100644
--- a/src/lib/marble/StyleBuilder.h
+++ b/src/lib/marble/StyleBuilder.h
@@ -24,6 +24,7 @@ class QFont;
class QColor;
namespace Marble {
+class GeoDataPlacemark;
class OsmPlacemarkData;
class MARBLE_EXPORT StyleParameters
@@ -68,7 +69,7 @@ public:
* @param category the visual category for which the minimum zoom level shall be returned
* @return zoom level from which on the given visual category will be visible
*/
- int minimumZoomLevel(GeoDataFeature::GeoDataVisualCategory category) const;
+ int minimumZoomLevel(const GeoDataPlacemark &placemark) const;
/**
* @brief Returns the maximum zoom level in the theme.
diff --git a/src/lib/marble/layers/GeometryLayer.cpp b/src/lib/marble/layers/GeometryLayer.cpp
index feedca9..ee87860 100644
--- a/src/lib/marble/layers/GeometryLayer.cpp
+++ b/src/lib/marble/layers/GeometryLayer.cpp
@@ -273,7 +273,7 @@ void GeometryLayerPrivate::createGraphicsItemFromGeometry(const GeoDataGeometry*
return;
item->setStyleBuilder(m_styleBuilder);
item->setVisible( placemark->isGloballyVisible() );
- item->setMinZoomLevel(m_styleBuilder->minimumZoomLevel(placemark->visualCategory()));
+ item->setMinZoomLevel(m_styleBuilder->minimumZoomLevel(*placemark));
m_scene.addItem( item );
}