Merge pull request #5814 from m-kuhn/fixMultiLayerOfflineEditing

[offline] Apply attribute changes on multiple layers
This commit is contained in:
Matthias Kuhn 2017-12-06 18:47:44 +01:00 committed by GitHub
commit cb94bcf565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}