mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
[symbology][gui] Fix symbol selector dialog not passing on its context to its widget
This commit is contained in:
parent
c004c6662b
commit
48b7079375
@ -417,9 +417,13 @@ void QgsSymbolSelectorWidget::setContext( const QgsSymbolWidgetContext &context
|
||||
|
||||
QWidget *widget = stackedWidget->currentWidget();
|
||||
if ( QgsLayerPropertiesWidget *layerProp = qobject_cast<QgsLayerPropertiesWidget *>( widget ) )
|
||||
{
|
||||
layerProp->setContext( context );
|
||||
}
|
||||
else if ( QgsSymbolsListWidget *listWidget = qobject_cast<QgsSymbolsListWidget *>( widget ) )
|
||||
{
|
||||
listWidget->setContext( context );
|
||||
}
|
||||
|
||||
layerChanged();
|
||||
updatePreview();
|
||||
@ -872,12 +876,12 @@ QMenu *QgsSymbolSelectorDialog::advancedMenu()
|
||||
|
||||
void QgsSymbolSelectorDialog::setContext( const QgsSymbolWidgetContext &context )
|
||||
{
|
||||
mContext = context;
|
||||
mSelectorWidget->setContext( context );
|
||||
}
|
||||
|
||||
QgsSymbolWidgetContext QgsSymbolSelectorDialog::context() const
|
||||
{
|
||||
return mContext;
|
||||
return mSelectorWidget->context();
|
||||
}
|
||||
|
||||
QgsSymbol *QgsSymbolSelectorDialog::symbol()
|
||||
|
@ -398,7 +398,6 @@ class GUI_EXPORT QgsSymbolSelectorDialog : public QDialog
|
||||
|
||||
QgsSymbolSelectorWidget *mSelectorWidget = nullptr;
|
||||
QDialogButtonBox *mButtonBox = nullptr;
|
||||
QgsSymbolWidgetContext mContext;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user