Bug report #4056

when built-in SVGs are added to a composer layout paths should be relative to the install directory

Added by Alister Hood over 9 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:master Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:14042

Description

When a built in SVG is used as a layer symbol, the path is stored in the .qgs file as a path relative to the QGIS install directory, regardless of whether the project is configured to use absolute paths or relative paths. This is good, as it means the project file is portable between instances of QGIS installed on different platforms or in different directories.

When a built in SVG is added to a composer layout using the "add image" button, the path to the SVG is currently stored in the .qgs file as an absolute path or as a path relative to the .qgs file, depending on the project configuration. This is bad - if you open the composer layout on a system where QGIS is installed to a different location then the SVG is missing. If the SVG is built in, the path should be stored relative to the QGIS install directory. If the SVG is in one of the user-defined paths then it should be stored relative to that location.

The code changes for #3154 might be a helpful reference

test_svg_paths.zip - example project files for inspection if required (8.85 KB) Alister Hood, 2011-07-06 05:24 PM

History

#1 Updated by Paolo Cavallini over 9 years ago

  • Category set to 33
  • Pull Request or Patch supplied set to No

#2 Updated by Tim Sutton about 9 years ago

  • Target version changed from Version 1.7.1 to Version 1.7.2

#3 Updated by Giovanni Manghi almost 9 years ago

  • Target version changed from Version 1.7.2 to Version 1.7.3

#4 Updated by Giovanni Manghi almost 9 years ago

  • Target version changed from Version 1.7.3 to Version 1.7.4

#5 Updated by Paolo Cavallini over 8 years ago

  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to master
  • Target version changed from Version 1.7.4 to Version 1.8.0

#6 Updated by Paolo Cavallini about 8 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

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

  • Category changed from 33 to Map Composer/Printing

#8 Updated by Alister Hood over 6 years ago

When a built in SVG is added to a composer layout using the "add image" button, the path to the SVG is currently stored in the .qgs file as an absolute path or as a path relative to the .qgs file, depending on the project configuration.

Now it is always stored as an absolute path.

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

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#10 Updated by Giovanni Manghi over 3 years ago

  • Regression? set to No
  • Easy fix? set to No

#11 Updated by Giovanni Manghi over 1 year ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF