Skip to content

Commit

Permalink
Fix diagram legend symbol selector missing associated layer (refs #16164
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nyalldawson committed Feb 14, 2017
1 parent 852b1df commit 3230e7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/qgsdiagramproperties.cpp
Expand Up @@ -939,7 +939,13 @@ void QgsDiagramProperties::on_mPlacementComboBox_currentIndexChanged( int index
void QgsDiagramProperties::on_mButtonSizeLegendSymbol_clicked()
{
QgsMarkerSymbol* newSymbol = mSizeLegendSymbol->clone();
QgsSymbolSelectorDialog d( newSymbol, QgsStyle::defaultStyle(), nullptr, this );
QgsSymbolWidgetContext context;
context.setMapCanvas( mMapCanvas );
QgsExpressionContext ec = createExpressionContext();
context.setExpressionContext( &ec );

QgsSymbolSelectorDialog d( newSymbol, QgsStyle::defaultStyle(), mLayer, this );
d.setContext( context );

if ( d.exec() == QDialog::Accepted )
{
Expand Down

0 comments on commit 3230e7b

Please sign in to comment.