Bug report #16389
sld stroke color is not saved correctly in polygonsymbolyzer
|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|
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