Bug report #7935

SVG paths still absolute if project set to use relative paths

Added by Gavin Fleming over 7 years ago. Updated almost 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Project Loading/Saving
Affected QGIS version:master Regression?:No
Operating System:ubuntu Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:16804

Description

QGIS 1.8

I am distributing a project that uses custom svg symbols, hence it has a local, relative svg directory. However, even if I set the project to use relative paths, the svg symbol paths are saved as absolute paths, meaning that we have to edit the project file manually to make them relative.

So, if a project is set to use relative paths then ALL paths should be relative.

History

#1 Updated by Antonio Locandro over 6 years ago

Is this behaviour still present in master?

#2 Updated by Alister Hood over 6 years ago

Doesn't look like it to me, although I haven't tested with a custom svg path:

<renderer-v2 symbollevels="0" type="singleSymbol">
<symbols>
<symbol alpha="1" type="marker" name="0">
<layer pass="0" class="SvgMarker" locked="0">
<prop k="angle" v="0"/>
<prop k="fill" v="#000000"/>
<prop k="horizontal_anchor_point" v="1"/>
<prop k="name" v="wind_roses/WindRose_01.svg"/>

#3 Updated by Alister Hood over 6 years ago

Oh, I see. If the svg is in the QGIS install directory (on my system /usr/share/qgis/svg) or the user's directory (~/.qgis2//svg) then the path is saved as relative. If the svg is in the same directory as the .qgs project file (including subdirectories) then the path is saved as relative. If the svg is somewhere else in the filesystem then the path is saved as absolute.

So if you wanted to use a setup something like this (which seems like not a bad idea) the relative paths wouldn't work:
//server name/QGIS stuff/
//server name/QGIS stuff/Projects/
//server name/QGIS stuff/SVGS/

#4 Updated by Jürgen Fischer over 6 years ago

  • Category set to Project Loading/Saving

#5 Updated by Nyall Dawson about 5 years ago

  • Status changed from Open to Feedback

I can't reproduce on master. Can you confirm?

#6 Updated by Giovanni Manghi almost 5 years ago

  • Resolution set to not reproducable
  • Status changed from Feedback to Closed

closing for lack of feedback.

Also available in: Atom PDF