Skip to content
Permalink
Browse files

Merge pull request #9778 from qgis/backport-9763-to-release-3_4

[Backport release-3_4] Apply SLD PointSymbolizer on single centroid for polygon
  • Loading branch information
rldhont committed Apr 12, 2019
2 parents 2b35644 + 5538cf8 commit 568260c742f4884aaedd96636b649d48c5908c9a
Showing with 6 additions and 0 deletions.
  1. +1 −0 src/core/symbology/qgsfillsymbollayer.cpp
  2. +5 −0 tests/src/python/test_qgssymbollayer.py
@@ -3510,6 +3510,7 @@ QgsSymbolLayer *QgsCentroidFillSymbolLayer::createFromSld( QDomElement &element

std::unique_ptr< QgsCentroidFillSymbolLayer > sl = qgis::make_unique< QgsCentroidFillSymbolLayer >();
sl->setSubSymbol( marker.release() );
sl->setPointOnAllParts( false );
return sl.release();
}

@@ -698,6 +698,11 @@ def testQgsCentroidFillSymbolLayer(self):
mMessage = 'Expected "%s" got "%s"' % (mExpectedValue, mValue)
assert mExpectedValue == mValue, mMessage

mExpectedValue = False
mValue = mSymbolLayer.pointOnAllParts()
mMessage = 'Expected "%s" got "%s"' % (mExpectedValue, mValue)
assert mExpectedValue == mValue, mMessage

# test colors, need to make sure colors are passed/retrieved from subsymbol
mSymbolLayer.setColor(QColor(150, 50, 100))
self.assertEqual(mSymbolLayer.color(), QColor(150, 50, 100))

0 comments on commit 568260c

Please sign in to comment.
You can’t perform that action at this time.