Skip to content

Commit

Permalink
Limit resolution of symbol fills during composer previews to improve …
Browse files Browse the repository at this point in the history
…composer responsiveness
  • Loading branch information
nyalldawson committed Mar 21, 2014
1 parent 3c7732c commit 375e0d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/core/composer/qgscomposershape.cpp
Expand Up @@ -147,7 +147,9 @@ void QgsComposerShape::drawShapeUsingSymbol( QPainter* p )
context.setScaleFactor( 1.0 );
if ( mComposition->plotStyle() == QgsComposition::Preview )
{
context.setRasterScaleFactor( horizontalViewScaleFactor() );
//Limit resolution of symbol fill if composition is not being exported
//otherwise zooming into composition slows down renders
context.setRasterScaleFactor( qMin( horizontalViewScaleFactor(), 3.0 ) );
}
else
{
Expand Down
4 changes: 3 additions & 1 deletion src/core/composer/qgspaperitem.cpp
Expand Up @@ -158,7 +158,9 @@ void QgsPaperItem::paint( QPainter* painter, const QStyleOptionGraphicsItem* ite
context.setScaleFactor( 1.0 );
if ( mComposition->plotStyle() == QgsComposition::Preview )
{
context.setRasterScaleFactor( horizontalViewScaleFactor() );
//Limit resolution of symbol fill if composition is not being exported
//otherwise zooming into composition slows down renders
context.setRasterScaleFactor( qMin( horizontalViewScaleFactor(), 3.0 ) );
}
else
{
Expand Down

0 comments on commit 375e0d4

Please sign in to comment.