Skip to content
Permalink
Browse files

apply #2376

git-svn-id: http://svn.osgeo.org/qgis/trunk@13287 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Apr 8, 2010
1 parent 3bac9e0 commit 348caa35cb76916311da37ab027f85ea95d1e39b
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/core/raster/qgsrasterlayer.cpp
@@ -305,7 +305,7 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
// same form.

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

for ( int i = 0; i < GDALGetDriverCount(); ++i )
{
@@ -364,7 +364,7 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
if ( !( myGdalDriverExtension.isEmpty() || myGdalDriverLongName.isEmpty() ) )
{
// XXX add check for SDTS; in that case we want (*CATD.DDF)
QString glob = "*." + myGdalDriverExtension;
QString glob = "*." + myGdalDriverExtension.replace("/", " *.");
// Add only the first JP2 driver found to the filter list (it's the one GDAL uses)
if ( myGdalDriverDescription == "JPEG2000" ||
myGdalDriverDescription.startsWith( "JP2" ) ) // JP2ECW, JP2KAK, JP2MrSID
@@ -384,7 +384,7 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
glob += " *.jpeg";
}

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

break; // ... to next driver, if any.
}
@@ -410,21 +410,21 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
if ( myGdalDriverDescription.startsWith( "USGSDEM" ) )
{
QString glob = "*.dem";
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
theFileFiltersString += ";;[GDAL] " + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
}
else if ( myGdalDriverDescription.startsWith( "DTED" ) )
{
// DTED use "*.dt0, *.dt1, *.dt2"
QString glob = "*.dt0";
glob += " *.dt1";
glob += " *.dt2";
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
theFileFiltersString += ";;[GDAL] " + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
}
else if ( myGdalDriverDescription.startsWith( "MrSID" ) )
{
// MrSID use "*.sid"
QString glob = "*.sid";
theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
theFileFiltersString += ";;[GDAL] " + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
}
else
{

0 comments on commit 348caa3

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