[QGIS Commit] r10868 - trunk/qgis/src/app/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Jun 1 06:53:53 EDT 2009


Author: mhugent
Date: 2009-06-01 06:53:53 -0400 (Mon, 01 Jun 2009)
New Revision: 10868

Modified:
   trunk/qgis/src/app/composer/qgscomposer.cpp
Log:
Append suffix for composer template file. Fixes bug #1708

Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp	2009-05-31 12:10:28 UTC (rev 10867)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp	2009-06-01 10:53:53 UTC (rev 10868)
@@ -777,8 +777,13 @@
     return;
   }
 
-  //save directory
   QFileInfo saveFileInfo( saveFileName );
+  //check if suffix has been added
+  if(saveFileInfo.suffix().isEmpty())
+  {
+    QString saveFileNameWithSuffix = saveFileName.append(".qpt");
+    saveFileInfo = QFileInfo(saveFileNameWithSuffix);
+  }
   settings.setValue( "UI/LastComposerTemplateDir", saveFileInfo.absolutePath() );
 
   QFile templateFile( saveFileName );



More information about the QGIS-commit mailing list