Skip to content

Commit

Permalink
Accept newline terminated string as temporary scratch layer
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nirvn committed Jan 10, 2020
1 parent b02b0be commit a816bb8
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 a816bb8

Please sign in to comment.