Skip to content

Commit

Permalink
Fix incorrect calculation of priority for diagrams (fix #4692)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 13, 2015
1 parent 15b6043 commit 3117333
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgspallabeling.cpp
Expand Up @@ -3382,7 +3382,8 @@ int QgsPalLabeling::prepareLayer( QgsVectorLayer* layer, QStringList& attrNames,

int QgsPalLabeling::addDiagramLayer( QgsVectorLayer* layer, const QgsDiagramLayerSettings *s )
{
Layer* l = mPal->addLayer( layer->id().append( "d" ).toUtf8().data(), -1, -1, pal::Arrangement( s->placement ), METER, s->priority, s->obstacle, true, true );
double priority = 1 - s->priority / 10.0; // convert 0..10 --> 1..0
Layer* l = mPal->addLayer( layer->id().append( "d" ).toUtf8().data(), -1, -1, pal::Arrangement( s->placement ), METER, priority, s->obstacle, true, true );
l->setArrangementFlags( s->placementFlags );

mActiveDiagramLayers.insert( layer->id(), *s );
Expand Down

0 comments on commit 3117333

Please sign in to comment.