Skip to content

Commit

Permalink
Fix map canvas preview
Browse files Browse the repository at this point in the history
Followup 8e20076
  • Loading branch information
m-kuhn committed Aug 10, 2017
1 parent ba5f114 commit a4597c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -2169,7 +2169,13 @@ void QgsMapCanvas::startPreviewJob( int number )
{
mPreviewTimer.setSingleShot( true );
mPreviewTimer.setInterval( 10 );
connect( &mPreviewTimer, &QTimer::timeout, [ = ]() { startPreviewJob( number + 1 ); } );
disconnect( mPreviewTimerConnection );
mPreviewTimerConnection = connect( &mPreviewTimer, &QTimer::timeout, [ = ]()
{
startPreviewJob( number + 1 );
}
);
mPreviewTimer.start();
}
}

Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsmapcanvas.h
Expand Up @@ -848,6 +848,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
QTimer mAutoRefreshTimer;

QTimer mPreviewTimer;
QMetaObject::Connection mPreviewTimerConnection;

QString mTheme;

Expand Down

0 comments on commit a4597c5

Please sign in to comment.