Bug report #9459

layer fails to render when rule-based symbology make use of $atlasfeatureid

Added by Mathieu Pellerin - nIRV over 7 years ago. Updated over 7 years ago.

Assignee:Nathan Woodrow
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 #:18051


In an atlas-defined project, a layer that has a rule-based symbology that relies on the $atlasfeatureid will not render upon project loading. The user will have to enter the layer's property window, and click on apply / ok for the layer to start rendering.

A basic scenario that leads to this problem is when a user will use a $id = $atlasfeatureid / $id != $atlasfeatureid set of rule to highlight the atlas feature on the map.

It's a bit of an odd one, so I'll let the attached test project showcase the problem.

error_expression.zip (3.16 MB) Mathieu Pellerin - nIRV, 2014-01-30 04:58 AM

Associated revisions

Revision 684dd890
Added by Martin Dobias over 7 years ago

Fix #9459 (layer fails to render when rule-based symbology make use of $atlasfeatureid)


#1 Updated by Paolo Cavallini over 7 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

#2 Updated by Nyall Dawson over 7 years ago

  • Priority changed from Normal to Severe/Regression

Think this should be a blocker, since it's a new feature which isn't working as expected.

I had a go at fixing it by making sure that $atlasfeatureid is set to 0 when an atlas based composition is first loaded, but this fix didn't work since the map has already been rendered by the time the composition is loaded.

I think this global variable needs to be set to 0 when a project is loaded but before any map is rendered.

#3 Updated by Martin Dobias over 7 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF