Skip to content
Permalink
Browse files

[pal] Make "always show" labels less likely to cover other labels

  • Loading branch information
nyalldawson committed Sep 3, 2015
1 parent 62fa304 commit 086a00750ccad56927b1cb6a01df9aaac4c23d45
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/pal/feature.cpp
@@ -92,6 +92,14 @@ namespace pal

double Feature::calculatePriority() const
{
if ( alwaysShow )
{
//if feature is set to always show, bump the priority up by orders of magnitude
//so that other feature's labels are unlikely to be placed over the label for this feature
//(negative numbers due to how pal::extract calculates inactive cost)
return 0.2;
}

return mPriority >= 0 ? mPriority : layer->priority();
}

0 comments on commit 086a007

Please sign in to comment.
You can’t perform that action at this time.