Bug report #5222
finding custom svg from project file assumes only on level of directories under SvgPath
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | - | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 14958 |
Description
I've tested it in 1.7.4 and master.
In order to use a custom svg file I've dropped it into ~homedir/.qgis/svg/<custom_directory>/<custom_subdirectory>
I'm able to use the svg both with 1.7.4 and with master.
I see it in the list of svgs, I can select it and it is drawn correctly, its path is correctly saved in project file (1.7.4 version).
However reopening the project qgis 1.7.4 is not able to find the file, resulting in
"Warning: QFSFileEngine::open: No file name specified
Warning: Cannot open file '', because: No file name specified"
<custom_directory> = custom
<custom_subdirectory> = ctr
Also master code is not able to find the svg, and Debug version log the following lines
Debug: src/core/symbology-ng/qgsmarkersymbollayerv2.cpp: 798: (symbolNameToPath) SvgPath: /usr/local/share/qgis/svg/
Debug: src/core/symbology-ng/qgsmarkersymbollayerv2.cpp: 804: (symbolNameToPath) Alternative svg path: /usr/local/share/qgis/svg//ctr/0706.svg
Debug: src/core/symbology-ng/qgsmarkersymbollayerv2.cpp: 827: (symbolNameToPath) Computed alternate path but no svg there either
Debug: src/core/symbology-ng/qgsmarkersymbollayerv2.cpp: 798: (symbolNameToPath) SvgPath: ~homedir/.qgis//svg/
Debug: src/core/symbology-ng/qgsmarkersymbollayerv2.cpp: 804: (symbolNameToPath) Alternative svg path: /home/monfardini/.qgis//svg//ctr/0706.svg <--
Debug: src/core/symbology-ng/qgsmarkersymbollayerv2.cpp: 827: (symbolNameToPath) Computed alternate path but no svg there either
The directory "custom" has been wiped from the path (it should be ~homedir/.qgis//svg/custom/ctr/0706.svg instead of ~homedir/.qgis//svg//ctr/0706.svg)
so it appears that code assumes only one level of directories under SvgPath
History
#1 Updated by Paolo Cavallini about 12 years ago
- Target version set to Version 2.0.0
#2 Updated by Gabriele Monfardini over 10 years ago
- Status changed from Open to Closed
As of 2014-06-10 this bug appears to be fixed in master