Skip to content
Permalink
Browse files

[pal] Shade all parts of label candidate as conflicting when

appropriate
  • Loading branch information
nyalldawson committed Aug 6, 2015
1 parent 39c728b commit ff28e6a9d9ab4dcc8c66dc5601e134b30fb29a59
Showing with 9 additions and 1 deletion.
  1. +7 −0 src/core/pal/labelposition.cpp
  2. +2 −1 src/core/pal/labelposition.h
@@ -377,6 +377,13 @@ namespace pal
return feature->layer()->name();
}

void LabelPosition::setConflictsWithObstacle( bool conflicts )
{
mHasObstacleConflict = conflicts;
if ( nextPart )
nextPart->setConflictsWithObstacle( conflicts );
}

bool LabelPosition::costShrink( void *l, void *r )
{
return (( LabelPosition* ) l )->mCost < (( LabelPosition* ) r )->mCost;
@@ -178,9 +178,10 @@ namespace pal

/** Sets whether the position is marked as conflicting with an obstacle feature.
* @param conflicts set to true to mark candidate as being in conflict
* @note This method applies to all label parts for the candidate position.
* @see conflictsWithObstacle
*/
void setConflictsWithObstacle( bool conflicts ) { mHasObstacleConflict = conflicts; }
void setConflictsWithObstacle( bool conflicts );

/** Returns whether the position is marked as conflicting with an obstacle feature.
* @see setConflictsWithObstacle

0 comments on commit ff28e6a

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