Skip to content

Commit

Permalink
Fix geometryless features are skipped when pasting as a new scratch l…
Browse files Browse the repository at this point in the history
…ayer
  • Loading branch information
nyalldawson committed Aug 14, 2018
1 parent 079c9fa commit d8f3ec4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -8815,11 +8815,17 @@ std::unique_ptr<QgsVectorLayer> QgisApp::pasteToNewMemoryVector()
for ( QgsFeature feature : features )
{
if ( !feature.hasGeometry() )
{
convertedFeatures.append( feature );
continue;
}

const QgsWkbTypes::Type type = feature.geometry().wkbType();
if ( type == QgsWkbTypes::Unknown || type == QgsWkbTypes::NoGeometry )
{
convertedFeatures.append( feature );
continue;
}

if ( QgsWkbTypes::singleType( wkbType ) != QgsWkbTypes::singleType( type ) )
{
Expand Down

0 comments on commit d8f3ec4

Please sign in to comment.