Skip to content

Commit e54a8b4

Browse files
author
jef
committed
start raster selection with all files instead of VRT
git-svn-id: http://svn.osgeo.org/qgis/trunk@13121 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 371b455 commit e54a8b4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/core/raster/qgsrasterlayer.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
303303
// "DMD_EXTENSION=.*". We'll also store the long name of the
304304
// driver, which will be found in DMD_LONGNAME, which will have the
305305
// same form.
306+
307+
// start with the default case
308+
theFileFiltersString = tr( "All files (*)" );
306309

307310
for ( int i = 0; i < GDALGetDriverCount(); ++i )
308311
{
@@ -381,7 +384,7 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
381384
glob += " *.jpeg";
382385
}
383386

384-
theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
387+
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
385388

386389
break; // ... to next driver, if any.
387390
}
@@ -407,19 +410,19 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
407410
if ( myGdalDriverDescription.startsWith( "USGSDEM" ) )
408411
{
409412
QString glob = "*.dem";
410-
theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
413+
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
411414
}
412415
else if ( myGdalDriverDescription.startsWith( "DTED" ) )
413416
{
414417
// DTED use "*.dt0"
415418
QString glob = "*.dt0";
416-
theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
419+
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
417420
}
418421
else if ( myGdalDriverDescription.startsWith( "MrSID" ) )
419422
{
420423
// MrSID use "*.sid"
421424
QString glob = "*.sid";
422-
theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
425+
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
423426
}
424427
else
425428
{
@@ -431,8 +434,6 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
431434

432435
} // each loaded GDAL driver
433436

434-
// can't forget the default case
435-
theFileFiltersString += tr( "All other files (*)" );
436437
QgsDebugMsg( "Raster filter list built: " + theFileFiltersString );
437438
} // buildSupportedRasterFileFilter_()
438439

0 commit comments

Comments
 (0)