Skip to content
Permalink
Browse files

don't flatten geometries when pasting them as new memory layer

  • Loading branch information
alexbruy committed Oct 5, 2016
1 parent b9ca91a commit 2b115449ab5d769e033c0e5f1c8d9360d7bafd8c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/qgisapp.cpp
@@ -7505,7 +7505,7 @@ QgsVectorLayer *QgisApp::pasteToNewMemoryVector()
if ( !feature.hasGeometry() )
continue;

QgsWkbTypes::Type type = QgsWkbTypes::flatType( feature.geometry().wkbType() );
QgsWkbTypes::Type type = feature.geometry().wkbType();

if ( type == QgsWkbTypes::Unknown || type == QgsWkbTypes::NoGeometry )
continue;
@@ -7535,7 +7535,7 @@ QgsVectorLayer *QgisApp::pasteToNewMemoryVector()

QgsWkbTypes::Type wkbType = !typeCounts.isEmpty() ? typeCounts.keys().value( 0 ) : QgsWkbTypes::NoGeometry;

QString typeName = wkbType != QgsWkbTypes::NoGeometry ? QString( QgsWkbTypes::displayString( wkbType ) ).remove( "WKB" ) : "none";
QString typeName = wkbType != QgsWkbTypes::NoGeometry ? QString( QgsWkbTypes::displayString( wkbType ) ) : "none";

if ( features.isEmpty() )
{
@@ -7590,7 +7590,7 @@ QgsVectorLayer *QgisApp::pasteToNewMemoryVector()
if ( !feature.hasGeometry() )
continue;

QgsWkbTypes::Type type = QgsWkbTypes::flatType( feature.geometry().wkbType() );
QgsWkbTypes::Type type = feature.geometry().wkbType();
if ( type == QgsWkbTypes::Unknown || type == QgsWkbTypes::NoGeometry )
continue;

0 comments on commit 2b11544

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