Skip to content
Permalink
Browse files

Fixes #34946 : save masking pen join style

  • Loading branch information
troopa81 authored and nyalldawson committed May 7, 2020
1 parent 01ec02a commit 17006551e60e23f68fa58c39a2d2fb73f5768486
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/gui/qgstextformatwidget.cpp
  2. +2 −2 tests/src/python/test_qgstextformatwidget.py
@@ -1037,7 +1037,7 @@ QgsTextFormat QgsTextFormatWidget::format( bool includeDataDefinedProperties ) c
mask.setOpacity( mMaskOpacityWidget->opacity() );
mask.setSizeUnit( mMaskBufferUnitWidget->unit() );
mask.setSizeMapUnitScale( mMaskBufferUnitWidget->getMapUnitScale() );
mask.setJoinStyle( mBufferJoinStyleComboBox->penJoinStyle() );
mask.setJoinStyle( mMaskJoinStyleComboBox->penJoinStyle() );
if ( mMaskEffect && !QgsPaintEffectRegistry::isDefaultStack( mMaskEffect.get() ) )
mask.setPaintEffect( mMaskEffect->clone() );
else
@@ -69,7 +69,7 @@ def createMaskSettings(self):
s.setSizeUnit(QgsUnitTypes.RenderPixels)
s.setSizeMapUnitScale(QgsMapUnitScale(1, 2))
s.setOpacity(0.5)
s.setJoinStyle(Qt.RoundJoin)
s.setJoinStyle(Qt.BevelJoin)
s.setPaintEffect(QgsBlurEffect.create({'blur_level': '2.0', 'blur_unit': QgsUnitTypes.encodeUnit(QgsUnitTypes.RenderMillimeters), 'enabled': '1'}))
s.setMaskedSymbolLayers([QgsSymbolLayerReference("layerid1", QgsSymbolLayerId("symbol", 1)),
QgsSymbolLayerReference("layerid2", QgsSymbolLayerId("symbol2", 2))])
@@ -82,7 +82,7 @@ def checkMaskSettings(self, s):
self.assertEqual(s.sizeUnit(), QgsUnitTypes.RenderPixels)
self.assertEqual(s.sizeMapUnitScale(), QgsMapUnitScale(1, 2))
self.assertEqual(s.opacity(), 0.5)
self.assertEqual(s.joinStyle(), Qt.RoundJoin)
self.assertEqual(s.joinStyle(), Qt.BevelJoin)
self.assertTrue(s.paintEffect())
self.assertEqual(s.paintEffect().blurLevel(), 2.0)
self.assertEqual(s.maskedSymbolLayers(), [QgsSymbolLayerReference("layerid1", QgsSymbolLayerId("symbol", 1)),

0 comments on commit 1700655

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