Bug report #7871
The SVG marker window has several bugs related to SVG parameters
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||16746|
The SVG marker window has several bugs. I encounter them on Windows, and it seems some (for instance #1) don't happen on Mac.
1a. In the "SVG Image" widget (the one with all the SVGs), the symbols are all displayed with param(fill) as black, regardless of the default color.
1b. Same for param(outline)
1c. Same for param(outline-width)
2a. When selecting a symbol from the list, the fill color well is black, regardless of the default color.
2b. Same for the border color well.
2c. The border width spinbox displays 1, regardless of the default width.
3a. Upon reopening the SVG marker window (either by closing the window and reopening it, or by clicking on "marker" and then back on "svg marker"), the "fill" color well displays the default SVG color, regardless of the color override.
3b. The "border" color displays black.
(The border width displays the proper value)
As far as I understand, it seems that :
param(fill) #default is loaded as it should, but the GUI does not work properly
param(outline) #default ignores #default, and the GUI does not work properly
param(outline-width) default ignores #default, but the GUI works properly
It also seems that all the defaults values are ignored for the SVG preview in the symbols list.
Note : I've tested this with the "octogon.svg" with these attributes :
fill="param(fill) #F00" stroke="param(outline) #0F0" stroke-width="param(outline-width) 25"
#4 Updated by Hien TRAN-QUANG over 7 years ago
Before I do a pull request, here is what I have done so far :
- SVG marker fill-color and pen-outline are correctly set back when changing widget or closing/reopening the marker windows.
- selecting another SVG marker selects that SVG default fill and color (1st ones in the SVG, so that can be black, white or any other color) so you have to reselect a new color. Are colors supposed to be kept and not changed back to default ?
For your last comment (SVG preview in the symbol list) : do you expect to keep the selected fill and outline colors and redraw icons accordingly ?