Skip to content

Commit

Permalink
[layouts] Always use the correct legend size when rendering legends
Browse files Browse the repository at this point in the history
No existing known bugs caused by this, but it should be done anyway
and will help make future legend related work less confusing...
  • Loading branch information
nyalldawson committed Jun 14, 2019
1 parent f432471 commit 334103d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitemlegend.cpp
Expand Up @@ -174,7 +174,7 @@ void QgsLayoutItemLegend::draw( QgsLayoutItemRenderContext &context )
}

QgsLegendRenderer legendRenderer( mLegendModel.get(), mSettings );
legendRenderer.setLegendSize( mSizeToContents ? QSize() : rect().size() );
legendRenderer.setLegendSize( rect().size() );

legendRenderer.drawLegend( context.renderContext() );

Expand Down

0 comments on commit 334103d

Please sign in to comment.