Opened 14 years ago

Closed 14 years ago

#3154 closed bug (fixed)

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

Reported by: neumann Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.6.0
Component: Symbology Version:
Keywords: Cc: mhugent
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

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.

Change History (3)

comment:1 by mhugent, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r14463

comment:2 by neumann, 14 years ago

Resolution: fixed
Status: closedreopened

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.

comment:3 by mhugent, 14 years ago

Resolution: fixed
Status: reopenedclosed

Should be fixed in r14515

Note: See TracTickets for help on using tickets.