Bug report #12973
layer panel's symbol are drawn with excessive width if they are located >=2nd-level of a rule-based tree
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||worksforme|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||21051|
The layer panel will draw symbols for polygons located in 2nd level of a rule-based tree with a width twice a large as normal. It's a bit difficult to explain in words, but the attached screenshot (bug-legend.png) should make it easy to understand.Steps to reproduce:
- Create a new project
- Add a polygon dataset
- Open the layer property window, and set the symbology to rule-based
- Add a root rule (simple fill), add a sub-rule to that root rule (also simple fill), and apply the symbology
- Look at your layer panel, you'll notice the sub-rule legend symbol's width is abnormally large
It's not a huge issue, but for people who like to keep the layer panel a small as possible, the extra space taken by the legend symbol's extra width is unfortunate.
#2 Updated by Johannes Kroeger almost 4 years ago
- File layers.png added
I cannot confirm this bug in QGIS 2.18.11.
I loaded NE countries.
Added a rule on
"labelrank" = 3 with a simple fill.
Used "Refine selected rules" -> "Add categories to rule" (which I guess nIRV meant by sub-rule) on the
level attribute. Also used a simple fill.
All style "icons" in the layer tree look square and the same size.