Skip to content

Commit

Permalink
Speed up reading the field list from clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
i-s-o authored and nyalldawson committed Jan 9, 2020
1 parent 7a3d22d commit 5765cab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsclipboard.cpp
Expand Up @@ -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" ) )
{
Expand Down

0 comments on commit 5765cab

Please sign in to comment.