[QGIS Commit] r13288 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Apr 8 17:09:13 EDT 2010


Author: jef
Date: 2010-04-08 17:09:10 -0400 (Thu, 08 Apr 2010)
New Revision: 13288

Modified:
   trunk/qgis/src/app/qgisapp.cpp
Log:
fix filters in Save as Image

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2010-04-08 18:55:07 UTC (rev 13287)
+++ trunk/qgis/src/app/qgisapp.cpp	2010-04-08 21:09:10 UTC (rev 13288)
@@ -2470,7 +2470,7 @@
 */
 static QString createFileFilter_( QString const &longName, QString const &glob )
 {
-  return longName + " (" + glob.toLower() + " " + glob.toUpper() + ");;";
+  return longName + " (" + glob.toLower() + " " + glob.toUpper() + ")";
 }                               // createFileFilter_
 
 
@@ -3575,7 +3575,6 @@
   QString myLastUsedFilter = myQSettings.value( "/UI/saveAsImageFilter" ).toString();
   QString myLastUsedDir = myQSettings.value( "/UI/lastSaveAsImageDir", "." ).toString();
 
-
   // get a list of supported output image types
   int myCounterInt = 0;
   QString myFilters;
@@ -3585,8 +3584,12 @@
   {
     QString myFormat = QString( formats.at( myCounterInt ) );
     //svg doesnt work so skip it
-    if ( myFormat ==  "svg" ) continue;
+    if ( myFormat ==  "svg" )
+      continue;
+
     QString myFilter = createFileFilter_( myFormat + " format", "*." + myFormat );
+    if( !myFilters.isEmpty() )
+      myFilters += ";;";
     myFilters += myFilter;
     myFilterMap[myFilter] = myFormat;
   }



More information about the QGIS-commit mailing list