Skip to content

Commit

Permalink
Force a refresh after disabling view updates
Browse files Browse the repository at this point in the history
  • 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
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ Returns the delta (in layout coordinates) by which to move items
for the given key ``event``. for the given key ``event``.
%End %End



public slots: public slots:


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


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

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


public slots: public slots:


Expand Down

0 comments on commit 70e7185

Please sign in to comment.