Bug report #14148

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

Added by Mathieu Pellerin - nIRV almost 2 years ago. Updated almost 2 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No

Description

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, 01/20/2016 07:15 PM

Associated revisions

Revision 9b6fa0d5
Added by Nyall Dawson almost 2 years ago

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

History

#1 Updated by Nyall Dawson almost 2 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF