Skip to content
Permalink
Browse files

Fix incorrect calculation of priority for diagrams (fix #4692)

  • Loading branch information
nyalldawson committed Apr 13, 2015
1 parent 15b6043 commit 3117333117722d682e1ae1e9f9ee9799d2b9504d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgspallabeling.cpp
@@ -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 );

0 comments on commit 3117333

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