Navigation Menu

Skip to content

Commit

Permalink
Offline editing plugin: only copy provider fields
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
m-kuhn committed Jan 22, 2015
1 parent eaca080 commit 8235e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsofflineediting.cpp
Expand Up @@ -524,7 +524,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con
// NOTE: force feature recount for PostGIS layer, else only visible features are counted, before iterating over all features (WORKAROUND)
layer->setSubsetString( "" );

QgsFeatureIterator fit = layer->getFeatures();
QgsFeatureIterator fit = layer->dataProvider()->getFeatures();

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

0 comments on commit 8235e4f

Please sign in to comment.