From 3bbda6cf6848896d81655967315db16bfa00dabd Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 6 Dec 2017 18:15:45 +0100 Subject: [PATCH] [offline] Apply attribute changes on multiple layers Fix #17647 --- src/core/qgsofflineediting.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/qgsofflineediting.cpp b/src/core/qgsofflineediting.cpp index f22b1d313e2..e17e7543877 100644 --- a/src/core/qgsofflineediting.cpp +++ b/src/core/qgsofflineediting.cpp @@ -297,10 +297,6 @@ void QgsOfflineEditing::synchronize() sqlExec( database.get(), sql ); sql = QStringLiteral( "DELETE FROM 'log_geometry_updates' WHERE \"layer_id\" = %1" ).arg( layerId ); sqlExec( database.get(), sql ); - - // reset commitNo - QString sql = QStringLiteral( "UPDATE 'log_indices' SET 'last_index' = 0 WHERE \"name\" = 'commit_no'" ); - sqlExec( database.get(), sql ); } else { @@ -331,6 +327,10 @@ void QgsOfflineEditing::synchronize() } } + // reset commitNo + QString sql = QStringLiteral( "UPDATE 'log_indices' SET 'last_index' = 0 WHERE \"name\" = 'commit_no'" ); + sqlExec( database.get(), sql ); + emit progressStopped(); }