Skip to content
Permalink
Browse files

Accept newline terminated string as valid input to paste as temporary…

… scratch layer

Fixes #33617
  • Loading branch information
i-s-o authored and nirvn committed Jan 6, 2020
1 parent a816bb8 commit 662ede581b325ff2dc4410180a52e1106949174a
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/app/qgsclipboard.cpp
@@ -309,6 +309,16 @@ QgsFeatureList QgsClipboard::copyOf( const QgsFields &fields ) const
QString text = cb->text( QClipboard::Clipboard );
#endif

if ( text.endsWith( '\n' ) )
{
text.chop( 1 );
// In case Windows <EOL> marker (CRLF) makes it into the variable "text"
if ( text.endsWith( '\r' ) )
{
text.chop( 1 );
}
}

return stringToFeatureList( text, fields );
}

0 comments on commit 662ede5

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