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 9c336b5 commit 946ca075868a0bb63f22432585d7c4eeecdacdb9
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgspallabeling.cpp
@@ -3387,7 +3387,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 946ca07

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