Skip to content

Commit

Permalink
Fix identify tool with rule renderer and nested else
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 17, 2018
1 parent d7fd14b commit a84cdd4
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/core/symbology/qgsrulebasedrenderer.cpp
Expand Up @@ -549,15 +549,22 @@ bool QgsRuleBasedRenderer::Rule::willRenderFeature( QgsFeature &feat, QgsRenderC
{
if ( rule->isElse() )
{
RuleList lst = rulesForFeature( feat, context, false );
lst.removeOne( rule );
if ( rule->children().isEmpty() )
{
RuleList lst = rulesForFeature( feat, context, false );
lst.removeOne( rule );

if ( lst.empty() )
if ( lst.empty() )
{
return true;
}
}
else
{
return true;
return rule->willRenderFeature( feat, context );
}
}
else if ( !rule->isElse( ) && rule->willRenderFeature( feat, context ) )
else if ( rule->willRenderFeature( feat, context ) )
{
return true;
}
Expand Down

0 comments on commit a84cdd4

Please sign in to comment.