[QGIS Commit] r13287 - trunk/qgis/src/core/raster

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Apr 8 14:55:09 EDT 2010


Author: jef
Date: 2010-04-08 14:55:07 -0400 (Thu, 08 Apr 2010)
New Revision: 13287

Modified:
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
Log:
apply #2376

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2010-04-08 15:45:35 UTC (rev 13286)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2010-04-08 18:55:07 UTC (rev 13287)
@@ -305,7 +305,7 @@
   // 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 @@
       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 @@
           glob += " *.jpeg";
         }
 
-        theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
+        theFileFiltersString += ";;[GDAL] " + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
 
         break;            // ... to next driver, if any.
       }
@@ -410,7 +410,7 @@
       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" ) )
       {
@@ -418,13 +418,13 @@
         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
       {



More information about the QGIS-commit mailing list