Skip to content
Permalink
Browse files

Fix geometryless features are skipped when pasting as a new scratch l…

…ayer

(cherry-picked from d8f3ec4)
  • Loading branch information
nyalldawson committed Aug 13, 2018
1 parent d5fd78c commit e89412bbae5e5c117c42fbe85e2fca7ac1fca12d
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgisapp.cpp
@@ -8647,11 +8647,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 ) )
{

0 comments on commit e89412b

Please sign in to comment.
You can’t perform that action at this time.