Skip to content

Commit

Permalink
Tweak legend expression cache invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 17, 2020
1 parent 5d98ad1 commit 2e33642
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitemlegend.cpp
Expand Up @@ -867,7 +867,6 @@ void QgsLayoutItemLegend::updateFilterByMap( bool redraw )
// the actual update will take place before the redraw.
// This is to avoid multiple calls to the filter
mFilterAskedForUpdate = true;
clearLegendCachedData();

if ( redraw )
update();
Expand Down Expand Up @@ -915,6 +914,7 @@ void QgsLayoutItemLegend::doUpdateFilterByMap()
else
mLegendModel->setLegendFilterByMap( nullptr );

clearLegendCachedData();
mForceResize = true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutlegendwidget.cpp
Expand Up @@ -1131,7 +1131,7 @@ void QgsLayoutLegendWidget::mLayerExpressionButton_clicked()
layerNode->setLabelExpression( expressiondialog.expressionText() );

mLegend->beginCommand( tr( "Update Legend" ) );
mLegend->updateLegend();
mLegend->refresh();
mLegend->adjustBoxSize();
mLegend->endCommand();
}
Expand Down

0 comments on commit 2e33642

Please sign in to comment.