Navigation Menu

Skip to content

Commit

Permalink
automatically append pdf and svg suffixes (#ticket 2776)
Browse files Browse the repository at this point in the history
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 0686e23
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -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 );

Expand Down Expand Up @@ -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 );

Expand Down

0 comments on commit 0686e23

Please sign in to comment.