Skip to content
Permalink
Browse files
automatically append pdf and svg suffixes (#ticket 2776)
git-svn-id: http://svn.osgeo.org/qgis/trunk@13628 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 2, 2010
1 parent f18cc52 commit 0686e23096ee953ea41072ee47fe0718bf3b14f8
Showing with 18 additions and 2 deletions.
  1. +18 −2 src/app/composer/qgscomposer.cpp
@@ -472,7 +472,15 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
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 );

@@ -736,7 +744,15 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
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 );

0 comments on commit 0686e23

Please sign in to comment.