[labelling] Fix masked symbol layers loss when

- opening layer properties window; or
- changing label settings in style dock
This commit is contained in:
nirvn 2019-12-17 10:01:36 +07:00 committed by Mathieu Pellerin
parent fa20ebd8d9
commit 3404dff67e
3 changed files with 7 additions and 0 deletions

View File

@ -159,6 +159,8 @@ Controls whether data defined alignment buttons are enabled.
protected slots:
void updateLinePlacementOptions();

View File

@ -843,6 +843,7 @@ void QgsTextFormatWidget::updateWidgetForFormat( const QgsTextFormat &format )
mBufferEffectWidget->setPaintEffect( mBufferEffect.get() );
// mask
mMaskedSymbolLayers = mask.maskedSymbolLayers();
mEnableMaskChkBx->setChecked( mask.enabled() );
mMaskBufferSizeSpinBox->setValue( mask.size() );
mMaskBufferUnitWidget->setUnit( mask.sizeUnit() );
@ -1021,6 +1022,7 @@ QgsTextFormat QgsTextFormatWidget::format( bool includeDataDefinedProperties ) c
mask.setPaintEffect( mMaskEffect->clone() );
else
mask.setPaintEffect( nullptr );
mask.setMaskedSymbolLayers( mMaskedSymbolLayers );
format.setMask( mask );
// shape background

View File

@ -189,6 +189,9 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, public QgsExpressionConte
//! Associated vector layer
QgsVectorLayer *mLayer = nullptr;
QgsSymbolLayerReferenceList mMaskedSymbolLayers;
protected slots:
//! Updates line placement options to reflect current state of widget