Skip to content

Commit

Permalink
apply #2376
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13287 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 8, 2010
1 parent 4a1f8c2 commit d2d8a55
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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
Expand All @@ -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.
}
Expand All @@ -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
{
Expand Down

0 comments on commit d2d8a55

Please sign in to comment.