Skip to content

Commit 70e7185

Browse files
committedJan 5, 2018
Force a refresh after disabling view updates
1 parent 7d8953f commit 70e7185

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed
 

‎python/gui/layout/qgslayoutview.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ Returns the delta (in layout coordinates) by which to move items
265265
for the given key ``event``.
266266
%End
267267

268-
269268
public slots:
270269

271270
void zoomFull();

‎src/gui/layout/qgslayoutview.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,13 @@ QPointF QgsLayoutView::deltaForKeyEvent( QKeyEvent *event )
446446
return QPointF( deltaX, deltaY );
447447
}
448448

449+
void QgsLayoutView::setPaintingEnabled( bool enabled )
450+
{
451+
mPaintingEnabled = enabled;
452+
if ( enabled )
453+
update();
454+
}
455+
449456
void QgsLayoutView::zoomFull()
450457
{
451458
fitInView( scene()->sceneRect(), Qt::KeepAspectRatio );

‎src/gui/layout/qgslayoutview.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class GUI_EXPORT QgsLayoutView: public QGraphicsView
275275
* used to temporarily halt painting while exporting layouts.
276276
* \note Not available in Python bindings.
277277
*/
278-
void setPaintingEnabled( bool enabled ) { mPaintingEnabled = enabled; } SIP_SKIP
278+
void setPaintingEnabled( bool enabled ); SIP_SKIP
279279

280280
public slots:
281281

0 commit comments

Comments
 (0)
Please sign in to comment.