Bug report #3154
SVG Patterns: References to SVG files should start with pattern/symbol repository when paths are set to relative
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||13214|
For SVG pattern fills, currently, the paths are stored relatively to the project file and not relatively to the symbol/pattern repository.
This makes it harder to move projects to a server or different machine that may have a different file/path layout.
It would be good if it could be implemented the same way like SVG symbols:
Current relative behavior with symbols:
Current relative behavior with patterns:
<layer pass="0" class="SVGFill" locked="0" >
<prop k="svgFile" v="../../qgis/patterns/use_zone_plan/wohnzone_mit_gewerbeerleichterung_1_satz_w2_40_wohnzone_2_geschossig.svg" />
<prop k="width" v="20" />
I think the "relative" paths should be stored absolutely, but starting from the pattern/symbol repository, with the svg:/ syntax.
#2 Updated by Andreas Neumann almost 9 years ago
- Resolution deleted (
- Status changed from Closed to Feedback
I tested this fix on Linux. It works with paths relative from the default system (/usr/local/share/qgis/svg) but not from user-specified paths, set in "Options" --> "Rendering & SVG" --> "SVG paths".
It would be great if this could work with user-defined paths as well.
In my tests QGIS introduced absolute paths in the .qgs project file, instead of relative ones when picking SVG symbols from a user defined SVG directory.