Bug report #13218

regression: rule-based symbology broken when a rule has an empty filter

Added by Mathieu Pellerin - nIRV over 5 years ago. Updated about 5 years ago.

Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21279


A regression emerged recently under QGIS master wheras the rule-based symbology will fail to render anything if one of its rules has no filter set (i.e. shows as (no filter) in the rules list).

Steps to reproduce:
  1. Create a new project
  2. Add a layer (large polygons will do best)
  3. Open the layer property, and set the symbology to rule-based
  4. Make sure that the single rule has no filter
  5. Apply, and see all the features gone

unterirdische_gebaeude.zip - demo project showing the issue (276 KB) Andreas Neumann, 2015-08-20 12:29 AM

Associated revisions

Revision abf23988
Added by Matthias Kuhn over 5 years ago

Rule based renderer: empty rule matches all

Fix #13218

Revision 978265c9
Added by Matthias Kuhn about 5 years ago

Rule-based renderer fully recover "empty filter matches all"

Fix #13218


#1 Updated by Anonymous over 5 years ago

  • Status changed from Open to Closed

#2 Updated by Andreas Neumann over 5 years ago

hm - still fails for my data.

Attached you find some data and a qml file. If you load it, the rule labeled "Unterirdisches Gebäude, Reservoir" (which is a "no filter" rule) only displays if the two other rules are off.

#3 Updated by Andreas Neumann over 5 years ago

Seems like before 1d7a6a4 things still work ok.

So there must be some new bug in 1d7a6a4 and it seems like abf2398 doesn't fix my problem.

#4 Updated by Anita Graser over 5 years ago

I can confirm that this issue still exists in today's OSGeo4W qgis-dev.

#5 Updated by Denis Rouzaud over 5 years ago

it works if you nest the two rules (Gestrichelt2 and Punktiert) into the Unterirdisches Gebaude, which I believe would be the logical structure.

#6 Updated by Andreas Neumann over 5 years ago

Thanks Denis for the hint. It may work in this particular case.

However - quite often the individual rules can't be nested as they have nothing to do with each other. I also have several projects and layers that I would have to change. Quite time consuming.

It is also a bit annoying if old content breaks because of a change in behaviour.

#7 Updated by Anonymous about 5 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF