summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <[email protected]>2016-07-13 04:14:05 +0200
committerFriedrich W. H. Kossebau <[email protected]>2016-07-13 04:14:05 +0200
commitd5148919d6a2f3a5bdf2874160c2e068651b6e76 (patch)
tree506414f65c1622cdce21c766af500a09b8f09083
parent40d1320916d0ec0ffaafaf060b8b1215321dfcc6 (diff)
Fix calculation of placemark label room to do it for displayName, not name
-rw-r--r--src/lib/marble/PlacemarkLayout.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/marble/PlacemarkLayout.cpp b/src/lib/marble/PlacemarkLayout.cpp
index a6a5230..c97820a 100644
--- a/src/lib/marble/PlacemarkLayout.cpp
+++ b/src/lib/marble/PlacemarkLayout.cpp
@@ -572,8 +572,10 @@ bool PlacemarkLayout::layoutPlacemark( const GeoDataPlacemark *placemark, qreal
// If there's not enough space free don't add a VisiblePlacemark here.
QRectF labelRect;
- if( !placemark->displayName().isEmpty() ) {
- labelRect = roomForLabel( style, x, y, placemark->name() );
+
+ const QString labelText = placemark->displayName();
+ if (!labelText.isEmpty()) {
+ labelRect = roomForLabel(style, x, y, labelText);
if ( labelRect.isNull() ) {
return false;
}