Fix diagram legend symbol selector missing associated layer (refs #16164)

This commit is contained in:
Nyall Dawson 2017-02-14 14:29:49 +10:00
parent 852b1dfb79
commit 3230e7bcbf

View File

@ -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 )
{