Skip to content

Commit cc4cee8

Browse files
committedAug 24, 2017
Do not quote when single raster file is selected
1 parent 81c3176 commit cc4cee8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎src/gui/qgsfilewidget.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ void QgsFileWidget::openFileDialog()
283283
if ( mStorageMode != GetMultipleFiles )
284284
{
285285
fileName = relativePath( fileName, true );
286-
// Keep the new value
287286
setFilePath( fileName );
288287
}
289288
else
@@ -292,7 +291,14 @@ void QgsFileWidget::openFileDialog()
292291
{
293292
fileNames.replace( i, relativePath( fileNames.at( i ), true ) );
294293
}
295-
setFilePath( QStringLiteral( "\"%1\"" ).arg( fileNames.join( "\" \"" ) ) );
294+
if ( fileNames.length() > 1 )
295+
{
296+
setFilePath( QStringLiteral( "\"%1\"" ).arg( fileNames.join( "\" \"" ) ) );
297+
}
298+
else
299+
{
300+
setFilePath( fileNames.first( ) );
301+
}
296302
}
297303
}
298304

0 commit comments

Comments
 (0)
Please sign in to comment.