[QGIS Commit] r13628 - trunk/qgis/src/app/composer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Jun 2 10:08:13 EDT 2010
Author: mhugent
Date: 2010-06-02 10:08:11 -0400 (Wed, 02 Jun 2010)
New Revision: 13628
Modified:
trunk/qgis/src/app/composer/qgscomposer.cpp
Log:
automatically append pdf and svg suffixes (#ticket 2776)
Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp 2010-06-02 13:38:36 UTC (rev 13627)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp 2010-06-02 14:08:11 UTC (rev 13628)
@@ -472,8 +472,16 @@
if ( result != QDialog::Accepted ) return;
QString myOutputFileNameQString = myQFileDialog->selectedFiles().first();
- if ( myOutputFileNameQString == "" ) return;
+ if ( myOutputFileNameQString == "" )
+ {
+ return;
+ }
+ if ( !myOutputFileNameQString.endsWith( ".pdf", Qt::CaseInsensitive ) )
+ {
+ myOutputFileNameQString.append( ".pdf" );
+ }
+
myQSettings.setValue( "/UI/lastSaveAsPdfFile", myOutputFileNameQString );
QPrinter printer;
@@ -736,8 +744,16 @@
if ( result != QDialog::Accepted ) return;
QString myOutputFileNameQString = myQFileDialog->selectedFiles().first();
- if ( myOutputFileNameQString == "" ) return;
+ if ( myOutputFileNameQString == "" )
+ {
+ return;
+ }
+ if ( !myOutputFileNameQString.endsWith( ".svg", Qt::CaseInsensitive ) )
+ {
+ myOutputFileNameQString.append( ".svg" );
+ }
+
myQSettings.setValue( "/UI/lastSaveAsSvgFile", myOutputFileNameQString );
//mView->setScene(0);//don't redraw the scene on the display while we render
More information about the QGIS-commit
mailing list