summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-06 15:40:31 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-11-06 15:42:22 (GMT)
commit52e9fbd1e82f72a83c5aa735638fac5882af69c2 (patch)
treee87cadc713f845e0ec90a2bdd66e0ecf3eb5dfc4
parent429811c2d14ec85ef42f91ec834ac738279e4cf5 (diff)
Reject non-render placemarks even earlier
-rw-r--r--src/lib/marble/PlacemarkLayout.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/marble/PlacemarkLayout.cpp b/src/lib/marble/PlacemarkLayout.cpp
index 292543f..f651f2f 100644
--- a/src/lib/marble/PlacemarkLayout.cpp
+++ b/src/lib/marble/PlacemarkLayout.cpp
@@ -525,9 +525,6 @@ bool PlacemarkLayout::layoutPlacemark( const GeoDataPlacemark *placemark, const
parameters.placemark = placemark;
auto style = m_styleBuilder->createStyle(parameters);
- if (style->iconStyle().icon().isNull()) {
- return false;
- }
mark = new VisiblePlacemark(placemark, coordinates, style);
m_visiblePlacemarks.insert( placemark, mark );
connect( mark, SIGNAL(updateNeeded()), this, SIGNAL(repaintNeeded()) );
@@ -575,14 +572,17 @@ bool PlacemarkLayout::layoutPlacemark( const GeoDataPlacemark *placemark, const
GeoDataCoordinates PlacemarkLayout::placemarkIconCoordinates( const GeoDataPlacemark *placemark ) const
{
- bool hasIcon;
- GeoDataCoordinates coordinates = placemark->coordinate( m_clock->dateTime(), &hasIcon);
-
- if (hasIcon || m_acceptedVisualCategories.contains(placemark->visualCategory())) {
- return coordinates;
+ GeoDataCoordinates coordinates = placemark->coordinate( m_clock->dateTime());
+ if (!m_acceptedVisualCategories.contains(placemark->visualCategory())) {
+ StyleParameters parameters;
+ parameters.placemark = placemark;
+ auto style = m_styleBuilder->createStyle(parameters);
+ if (style->iconStyle().icon().isNull()) {
+ return GeoDataCoordinates();
+ }
}
- return GeoDataCoordinates();
+ return coordinates;
}
QRectF PlacemarkLayout::roomForLabel( const GeoDataStyle::ConstPtr &style,