Skip to content

Commit 375e0d4

Browse files
committed
Limit resolution of symbol fills during composer previews to improve composer responsiveness
1 parent 3c7732c commit 375e0d4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/core/composer/qgscomposershape.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ void QgsComposerShape::drawShapeUsingSymbol( QPainter* p )
147147
context.setScaleFactor( 1.0 );
148148
if ( mComposition->plotStyle() == QgsComposition::Preview )
149149
{
150-
context.setRasterScaleFactor( horizontalViewScaleFactor() );
150+
//Limit resolution of symbol fill if composition is not being exported
151+
//otherwise zooming into composition slows down renders
152+
context.setRasterScaleFactor( qMin( horizontalViewScaleFactor(), 3.0 ) );
151153
}
152154
else
153155
{

src/core/composer/qgspaperitem.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ void QgsPaperItem::paint( QPainter* painter, const QStyleOptionGraphicsItem* ite
158158
context.setScaleFactor( 1.0 );
159159
if ( mComposition->plotStyle() == QgsComposition::Preview )
160160
{
161-
context.setRasterScaleFactor( horizontalViewScaleFactor() );
161+
//Limit resolution of symbol fill if composition is not being exported
162+
//otherwise zooming into composition slows down renders
163+
context.setRasterScaleFactor( qMin( horizontalViewScaleFactor(), 3.0 ) );
162164
}
163165
else
164166
{

0 commit comments

Comments
 (0)