Bug report #14148

@value variable of simple symbol fill color wrongly gets modified in data-defined expression

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

Assignee:Nyall Dawson
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 #:22150


I'm stumbled on an issue with the @value variable attached to the fill color of a simple symbol symbology. The color value of @value should always represent that of the fill color button, but in practice, it gets modified / overwritten to whatever is last outputted by a data-defined expression.

This means that a simple expression such as `if($id=20,'#ff0000',@value)` can't be used, as every feature rendered after a positive $id=20 match will be drawn with the '#ff0000' color. See attached fill_color_value.png for a screenshot demonstrating the issue.

I've tested other properties - such as label size, label buffer color - and those do not suffer from the same issue. For e.g., if you look at fill_color_value.png, you'll notice the buffer color for the label properly turns red, #ff0000, only on the matching if clause.

fill_color_value.png (165 KB) Mathieu Pellerin - nIRV, 2016-01-20 07:15 PM

Associated revisions

Revision 9b6fa0d5
Added by Nyall Dawson over 8 years ago

Fix @value is overwritten for some symbol properties (fix #14148)


#1 Updated by Nyall Dawson over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF