Skip to content
Permalink
Browse files

Check if maskingWidget has been populated to effectively apply the ch…

…ange. Should fix issue #37473.
  • Loading branch information
obrix authored and nyalldawson committed Jul 13, 2020
1 parent f5b56e3 commit fb9d1580da9a72d5df7763558a4ed933fe832384
Showing with 8 additions and 1 deletion.
  1. +5 −0 src/gui/qgsmaskingwidget.cpp
  2. +2 −0 src/gui/qgsmaskingwidget.h
  3. +1 −1 src/gui/vector/qgsvectorlayerproperties.cpp
@@ -332,3 +332,8 @@ void QgsMaskingWidget::apply()
layer->triggerRepaint();
}
}

bool QgsMaskingWidget::hasBeenPopulated()
{
return mMustPopulate == false;
}
@@ -47,6 +47,8 @@ class GUI_EXPORT QgsMaskingWidget: public QgsPanelWidget, private Ui::QgsMasking
//! Applies the changes
void apply();

bool hasBeenPopulated();

signals:
//! Emitted when a change is performed
void widgetChanged();
@@ -607,7 +607,7 @@ void QgsVectorLayerProperties::apply()
mMetadataFilled = false;

// save masking settings
if ( mMaskingWidget )
if ( mMaskingWidget && mMaskingWidget->hasBeenPopulated() )
mMaskingWidget->apply();

//

0 comments on commit fb9d158

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