Bug report #7871

The SVG marker window has several bugs related to SVG parameters

Added by Olivier Dalang almost 11 years ago. Updated over 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Symbology
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

Description

Hi !

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"

Thanks !

History

#1 Updated by Giovanni Manghi almost 11 years ago

  • Status changed from Open to Feedback

Hi Olivier, if this issues are confirmed then I would tag this as blocker, because it is anyway a regression. Cheers!

#2 Updated by Andreas Neumann almost 11 years ago

  • Priority changed from Normal to Severe/Regression

I can confirm these regressions.

#3 Updated by Giovanni Manghi almost 11 years ago

  • Status changed from Feedback to Open

#4 Updated by Hien TRAN-QUANG over 10 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 ?

#5 Updated by Andreas Neumann over 10 years ago

Hi,

Thank you for working on fixing this bug.

Regarding the preview: I would not change the initial symbol in the preview. Only when it was modified and the modified version is saved as a changed instance in the symbol library.

Thanks,
Andreas

#6 Updated by Hien TRAN-QUANG over 10 years ago

I made a Pull request for this blocker : [[https://github.com/qgis/Quantum-GIS/pull/836]]

#7 Updated by Giovanni Manghi over 10 years ago

  • Pull Request or Patch supplied changed from No to Yes

#8 Updated by René-Luc ReLuc over 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF