Bug report #19043

Data defined override for line width doesn't work properly when taking into account joined layer field

Added by Tudor Bărăscu almost 6 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Expressions
Affected QGIS version:3.1(master) Regression?:No
Operating System:Debian Buster Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26873

Description

I noticed that when activating the Data defined override option for line stroke and a joined layer is involved, the output isn't what it should.
For the following expression:

CASE WHEN "pipe_material_diameter" IS NOT NULL
THEN "pipe_material_diameter" / 900 + .2
ELSE .2
END

I would have expected that when the "pipe_material_diameter" IS NULL the width would be 0.2 as it should fall into the ELSE option, right?.
Instead, the width is taken from the default width option (3 if you look at the attached image).
Data defined override

Of course, I could have made the 0.2 as default width but it looks too small in the legend (as the legend presents the default width)

I've attached a test project.

styling_bug.png - Data defined override (38.8 KB) Tudor Bărăscu, 2018-05-28 02:35 PM

styling_data_defined_bug.zip - Test project (9.13 KB) Tudor Bărăscu, 2018-05-28 02:39 PM

problemo.png (13.4 KB) Tudor Bărăscu, 2018-05-28 02:54 PM

History

#1 Updated by Tudor Bărăscu almost 6 years ago

This is the buggy output, that fat pipe should have been 0.2 thin, not 3 mm.

#2 Updated by Tudor Bărăscu over 5 years ago

  • Status changed from Open to Closed

Works!

Also available in: Atom PDF