Skip to content

Commit

Permalink
[symbology][gui] Fix symbol selector dialog not passing on its contex…
Browse files Browse the repository at this point in the history
…t to its widget
  • Loading branch information
nirvn authored and nyalldawson committed Feb 6, 2025
1 parent c004c66 commit 48b7079
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/gui/symbology/qgssymbolselectordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion src/gui/symbology/qgssymbolselectordialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ class GUI_EXPORT QgsSymbolSelectorDialog : public QDialog

QgsSymbolSelectorWidget *mSelectorWidget = nullptr;
QDialogButtonBox *mButtonBox = nullptr;
QgsSymbolWidgetContext mContext;
};

#endif

0 comments on commit 48b7079

Please sign in to comment.