Skip to content

Commit 206965c

Browse files
committedOct 11, 2017
simplified stopRendering just before commitChanges
1 parent 46551a9 commit 206965c

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8003,34 +8003,15 @@ void QgisApp::saveEdits( QgsMapLayer *layer, bool leaveEditable, bool triggerRep
80038003
if ( vlayer == activeLayer() )
80048004
mSaveRollbackInProgress = true;
80058005

8006-
// wait for end of rendering to avoid lock in case of
8006+
// stop rendering to avoid lock in case of
80078007
// splilte and gpkg fix #15498
8008-
// Wait only if the current layer is in the rendering pool
80098008
if ( mMapCanvas->mapSettings().layers().contains( vlayer->id() ) )
80108009
{
80118010
if ( vlayer->dataProvider()->storageType().count( "SQLite" ) ||
80128011
vlayer->dataProvider()->storageType().count( "GPKG" ) )
80138012
{
8014-
// notify wait the rendering end
80158013
if ( mMapCanvas->isDrawing() )
8016-
{
8017-
// notify
8018-
QgsMessageBarItem *item = new QgsMessageBarItem( tr( "Save edit paused" ),
8019-
tr( "Waiting for end of rendering" ),
8020-
QgsMessageBar::WARNING, 0 );
8021-
messageBar()->pushItem( item );
8022-
// wait
8023-
while ( mMapCanvas->isDrawing() )
8024-
{
8025-
QEventLoop loop;
8026-
QTimer t;
8027-
connect( &t, SIGNAL( timeout() ), &loop, SLOT( quit() ) );
8028-
t.start( 100 );
8029-
loop.exec();
8030-
}
8031-
// remove wait message
8032-
messageBar()->popWidget( item );
8033-
}
8014+
mMapCanvas->stopRendering();
80348015
}
80358016
}
80368017

0 commit comments

Comments
 (0)
Please sign in to comment.