Skip to content

Commit

Permalink
fix #5665 (rendering order not working in rule-based renderer)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 30, 2012
1 parent f146abd commit 056300f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/symbology-ng/qgsrulebasedrendererv2.cpp
Expand Up @@ -621,12 +621,14 @@ void QgsRuleBasedRendererV2::startRender( QgsRenderContext& context, const QgsVe
mRootRule->startRender( context, vlayer );

QSet<int> symbolZLevelsSet = mRootRule->collectZLevels();
QList<int> symbolZLevels = symbolZLevelsSet.toList();
qSort( symbolZLevels );

// create mapping from unnormalized levels [unlimited range] to normalized levels [0..N-1]
// and prepare rendering queue
QMap<int, int> zLevelsToNormLevels;
int maxNormLevel = -1;
foreach( int zLevel, symbolZLevelsSet.toList() )
foreach( int zLevel, symbolZLevels )
{
zLevelsToNormLevels[zLevel] = ++maxNormLevel;
mRenderQueue.append( RenderLevel( zLevel ) );
Expand Down

0 comments on commit 056300f

Please sign in to comment.