Skip to content

Commit

Permalink
[pal] Make "always show" labels less likely to cover other labels
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 3, 2015
1 parent 62fa304 commit 086a007
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/pal/feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 086a007

Please sign in to comment.