Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix incorrect calculation of priority for diagrams (fix #4692)
- Loading branch information
Showing
with
2 additions
and
1 deletion.
-
+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 ); |
|
|