Bug report #3154

SVG Patterns: References to SVG files should start with pattern/symbol repository when paths are set to relative

Added by Andreas Neumann almost 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Symbology
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

Description

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:

<pointsymbol>svg:/abwasser/Oelabscheider_Mischwasser.svg</pointsymbol>

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" />
</layer>

I think the "relative" paths should be stored absolutely, but starting from the pattern/symbol repository, with the svg:/ syntax.

History

#1 Updated by Marco Hugentobler almost 9 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Fixed in 2ba62274 (SVN r14464)

#2 Updated by Andreas Neumann almost 9 years ago

  • Resolution deleted (fixed)
  • 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.

#3 Updated by Marco Hugentobler almost 9 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Should be fixed in

Also available in: Atom PDF