Skip to content

Commit 8235e4f

Browse files
committedJan 22, 2015
Offline editing plugin: only copy provider fields
Before only provider fields where created in the local database while it was attempted to copy every field in the layer (including virtual fields and joins) introducing a crash.
1 parent eaca080 commit 8235e4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/qgsofflineediting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con
524524
// NOTE: force feature recount for PostGIS layer, else only visible features are counted, before iterating over all features (WORKAROUND)
525525
layer->setSubsetString( "" );
526526

527-
QgsFeatureIterator fit = layer->getFeatures();
527+
QgsFeatureIterator fit = layer->dataProvider()->getFeatures();
528528

529529
emit progressModeSet( QgsOfflineEditing::CopyFeatures, layer->featureCount() );
530530
int featureCount = 1;

0 commit comments

Comments
 (0)
Please sign in to comment.