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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Mar 20 19:16:54 EDT 2010


Author: jef
Date: 2010-03-20 19:16:53 -0400 (Sat, 20 Mar 2010)
New Revision: 13121

Modified:
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
Log:
start raster selection with all files instead of VRT

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2010-03-20 22:57:08 UTC (rev 13120)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2010-03-20 23:16:53 UTC (rev 13121)
@@ -303,6 +303,9 @@
   // "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 )
   {
@@ -381,7 +384,7 @@
           glob += " *.jpeg";
         }
 
-        theFileFiltersString += myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
+        theFileFiltersString += ";;" + myGdalDriverLongName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
 
         break;            // ... to next driver, if any.
       }
@@ -407,19 +410,19 @@
       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
       {
@@ -431,8 +434,6 @@
 
   }                           // each loaded GDAL driver
 
-  // can't forget the default case
-  theFileFiltersString += tr( "All other files (*)" );
   QgsDebugMsg( "Raster filter list built: " + theFileFiltersString );
 }                               // buildSupportedRasterFileFilter_()
 



More information about the QGIS-commit mailing list