Bug report #8664

qgis dont load SVG symbol from they are in more than one subfolder in name attribute of a style

Added by aperi2007 - over 9 years ago. Updated over 8 years ago.

Assignee:Radim Blazek
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17393


I found this really bad boring bug.

If a put my svg symbol in a sub-sub-folder of an external path
(please notice the proof of subfolder should be almost two level to show the bug)

I see thay in the svg dialog.
I choose a symbol in a sub-sub-folder.
After this.
I save it on a style.

As I can see the svg path in the qml file is saved like this:

<layer pass="0" class="SvgMarker" locked="0">
<prop k="angle" v="0"/>
<prop k="fill" v="#000000"/>
<prop k="name" v="/sub-folder-1/sub-folder-1/3100-9.svg"/>
<prop k="offset" v="0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline" v="#000000"/>
<prop k="outline-width" v="1"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="size" v="4"/>
<prop k="size_unit" v="MM"/>

But when I go to reload the style It don't find the SVG.
After some other test.
I can see that qgis undertand only one level subfolder when it load the stye.

So if the SVG symbol is in a relative path like this:
<prop k="name" v="/sub-folder-1/3100-9.svg"/>
is correctly load

but if the svg symbol is in a relative path like this other:
<prop k="name" v="/sub-folder-1/sub-folder-1/3100-9.svg"/>

it is not load.

Please notice that both are generate choosing the svg from svg diloag and saving they as style.

Associated revisions

Revision 0eed3dcc
Added by Radim Blazek over 8 years ago

svg search path fix, fixes #8664


#1 Updated by aperi2007 - about 9 years ago


Is confirmed this issue ?

#2 Updated by Radim Blazek over 8 years ago

  • Status changed from Open to Closed

#3 Updated by Radim Blazek over 8 years ago

  • Assignee set to Radim Blazek

Ticket fixed with funding from Regione Toscana-SITA (CIG:ZB10C90E5A).

Also available in: Atom PDF