From 216623ffe02f16e98db63799c10da1f7063e2537 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 22 Jun 2016 10:50:22 +0200 Subject: [PATCH] Fix wrong mapping of feature ids in offline editing Fix #14727 --- src/core/qgsofflineediting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/qgsofflineediting.cpp b/src/core/qgsofflineediting.cpp index 8d212cfa44ad..da055643336d 100644 --- a/src/core/qgsofflineediting.cpp +++ b/src/core/qgsofflineediting.cpp @@ -661,11 +661,11 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit // Check if the online feature has been fetched (WFS download aborted for some reason) if ( i < offlineFeatureIds.count() ) { - addFidLookup( db, layerId, offlineFeatureIds.at( i ), remoteFeatureIds.at( remoteCount - ( i + 1 ) ) ); + addFidLookup( db, layerId, offlineFeatureIds.at( i ), remoteFeatureIds.at( i ) ); } else { - showWarning( QString( "Feature cannot be copied to the offline layer, please check if the online layer '%1' is sill accessible." ).arg( layer->name() ) ); + showWarning( tr( "Feature cannot be copied to the offline layer, please check if the online layer '%1' is still accessible." ).arg( layer->name() ) ); return nullptr; } emit progressUpdated( featureCount++ );