Skip to content
Permalink
Browse files

Speed up reading the field list from clipboard

  • Loading branch information
i-s-o authored and nyalldawson committed Jan 9, 2020
1 parent 7a3d22d commit 5765cabb951bc1f82da2b883635cc9b1c74e6d44
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/qgsclipboard.cpp
@@ -270,10 +270,10 @@ QgsFields QgsClipboard::retrieveFields() const
}

//wkt?
QStringList lines = string.split( '\n' );
if ( !lines.empty() )
QString firstLine = string.section( '\n', 0, 0 );
if ( !firstLine.isEmpty() )
{
QStringList fieldNames = lines.at( 0 ).split( '\t' );
QStringList fieldNames = firstLine.split( '\t' );
//wkt / text always has wkt_geom as first attribute (however values can be NULL)
if ( fieldNames.at( 0 ) != QLatin1String( "wkt_geom" ) )
{

0 comments on commit 5765cab

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