Bug report #16389
sld stroke color is not saved correctly in polygonsymbolyzer
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Unknown | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24298 |
Description
I've saved a style in SLD format.
In the style there were some polygons styled with simple fill and varius stroke colors.
Saving the style as SLD stroke color is saved incorrectly (and always with the same value).
Having a look at the code in git master (a71132a15bb7a5be3ff8fbd73331bcf0d6b0aaa8) in src/core/symbology-ng/qgsfillsymbollayer.cpp +347
QgsSymbolLayerUtils::lineToSld( doc, strokeElem, mStrokeStyle, strokeWidth, strokeWidth, &mPenJoinStyle );
forth parameter that should be a const QColor seems to be wrong (and in fact in our case stroke color resulted to be always 000004 since our strokeWidth is 4).
I think it should be corrected in
QgsSymbolLayerUtils::lineToSld( doc, strokeElem, mStrokeStyle, mStrokeColor, strokeWidth, &mPenJoinStyle );
This fixes the issue in my case.
I'm providing a small patch for this
Associated revisions
History
#1 Updated by Gabriele Monfardini over 7 years ago
- File patch_sld_stroke_color.patch added
#2 Updated by Anonymous over 7 years ago
- Status changed from Open to Closed
Fixed in changeset cf2f431fccc796bc576943b2c8215ba22fe7d29b.
#3 Updated by Jürgen Fischer over 7 years ago
- Category set to Unknown