Bug report #13631

when ELSE rule exists in Styling, all Labels are rendered regardless of styling groups being active/inactive

Added by Tudor Bărăscu about 4 years ago. Updated about 4 years ago.

Status:Closed
Priority:High
Assignee:Jürgen Fischer
Category:Labelling
Affected QGIS version:master Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21668

Description

If a layer using rule-based styling is active and has an ELSE rule (02ed712), then all the labels are rendered even though all the subgroups (including the ELSE rule) are set inactive.
Also, if one of the styling groups is inactive, labels are rendered for the features that fit the styling, and they shouldn't.

pic.png (18.8 KB) Tudor Bărăscu, 2015-10-19 03:12 AM

test_labeling_with_else_rules.zip - Test project (173 KB) Andreas Neumann, 2015-10-22 02:35 AM

styling_bug.zip (6.57 KB) Tudor Bărăscu, 2015-10-22 03:40 AM

Associated revisions

Revision ea0ce4ec
Added by Jürgen Fischer about 4 years ago

rule based renderer: keep skip else rule if an inactive rule matches, but still return if the feature was actually rendered so that only rendered features are labeled (fixes #13631)

Revision d6f66ee4
Added by Jürgen Fischer about 4 years ago

fix phantom labels for (actually not) rendered feature (refs #13631)

Revision bfd29333
Added by Jürgen Fischer about 4 years ago

fix phantom labels for (actually not) rendered feature (refs #13631)

(cherry picked from commit d6f66e & b36cd1f)

History

#1 Updated by Tudor Bărăscu about 4 years ago

2.8 LTR has the same issue.

#2 Updated by Jürgen Fischer about 4 years ago

  • Status changed from Open to Closed

#3 Updated by Andreas Neumann about 4 years ago

Thank you Jürgen for havinb a look at this.

However, I still have issues where labels are shown and the geometry is not shown.

Maybe an issue with ELSE rules combined with scale rules?

Demoproject uploaded. Project contains two layers - one without ELSE rule (behaves as expected), one with ELSE rule where labels are sometimes shown when they should't be shown.

#4 Updated by Jürgen Fischer about 4 years ago

  • Assignee set to Jürgen Fischer

#5 Updated by Tudor Bărăscu about 4 years ago

Bug example data
--------------------

In this example, the pipe geometry is rendered between 1:501 and 1:5001 but the labels are rendered at every scale, which shouldn't happen.

#6 Updated by Tudor Bărăscu about 4 years ago

Thanks a lot for solving it Jürgen.

Also available in: Atom PDF