Bug report #14148
@value variable of simple symbol fill color wrongly gets modified in data-defined expression
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 | Copied to github as #: | 22150 |
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.
Associated revisions
Fix @value is overwritten for some symbol properties (fix #14148)
History
#1 Updated by Nyall Dawson almost 9 years ago
- Status changed from Open to Closed
Fixed in changeset 9b6fa0d5c40a396b3ec99a525092902585339f4b.