Limit resolution of symbol fills during composer previews to improve composer responsiveness

This commit is contained in:
Nyall Dawson 2014-03-21 12:53:20 +11:00
parent 3c7732c86a
commit 375e0d40ed
2 changed files with 6 additions and 2 deletions

View File

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

View File

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