Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Force a refresh after disabling view updates
  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent 7d8953f commit 70e7185
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion python/gui/layout/qgslayoutview.sip
Expand Up @@ -265,7 +265,6 @@ Returns the delta (in layout coordinates) by which to move items
for the given key ``event``.
%End


public slots:

void zoomFull();
Expand Down
7 changes: 7 additions & 0 deletions src/gui/layout/qgslayoutview.cpp
Expand Up @@ -446,6 +446,13 @@ QPointF QgsLayoutView::deltaForKeyEvent( QKeyEvent *event )
return QPointF( deltaX, deltaY );
}

void QgsLayoutView::setPaintingEnabled( bool enabled )
{
mPaintingEnabled = enabled;
if ( enabled )
update();
}

void QgsLayoutView::zoomFull()
{
fitInView( scene()->sceneRect(), Qt::KeepAspectRatio );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutview.h
Expand Up @@ -275,7 +275,7 @@ class GUI_EXPORT QgsLayoutView: public QGraphicsView
* used to temporarily halt painting while exporting layouts.
* \note Not available in Python bindings.
*/
void setPaintingEnabled( bool enabled ) { mPaintingEnabled = enabled; } SIP_SKIP
void setPaintingEnabled( bool enabled ); SIP_SKIP

public slots:

Expand Down

0 comments on commit 70e7185

Please sign in to comment.