Bug report #14148
@value variable of simple symbol fill color wrongly gets modified in data-defined expression
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No|
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.