Skip to content

Commit

Permalink
start raster selection with all files instead of VRT
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13121 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 20, 2010
1 parent 8c3b703 commit e8517af
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -303,6 +303,9 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
// "DMD_EXTENSION=.*". We'll also store the long name of the
// driver, which will be found in DMD_LONGNAME, which will have the
// same form.

// start with the default case
theFileFiltersString = tr( "All files (*)" );

for ( int i = 0; i < GDALGetDriverCount(); ++i )
{
Expand Down Expand Up @@ -381,7 +384,7 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
glob += " *.jpeg";
}

theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";

break; // ... to next driver, if any.
}
Expand All @@ -407,19 +410,19 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
if ( myGdalDriverDescription.startsWith( "USGSDEM" ) )
{
QString glob = "*.dem";
theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
}
else if ( myGdalDriverDescription.startsWith( "DTED" ) )
{
// DTED use "*.dt0"
QString glob = "*.dt0";
theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
}
else if ( myGdalDriverDescription.startsWith( "MrSID" ) )
{
// MrSID use "*.sid"
QString glob = "*.sid";
theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
}
else
{
Expand All @@ -431,8 +434,6 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr

} // each loaded GDAL driver

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

Expand Down

0 comments on commit e8517af

Please sign in to comment.