Skip to content

Commit

Permalink
[georef] Improve behaviour for selecting map and report filename
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 17, 2015
1 parent c4f0d31 commit 1bdb426
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugins/georeferencer/qgstransformsettingsdialog.cpp
Expand Up @@ -222,7 +222,8 @@ void QgsTransformSettingsDialog::on_tbnMapFile_clicked()
{
QSettings s;
QString myLastUsedDir = s.value( "/Plugin-GeoReferencer/lastPDFReportDir", "" ).toString();
QString outputFileName = QFileDialog::getSaveFileName( 0, tr( "Select save PDF file" ), myLastUsedDir, tr( "PDF Format" ) + " (*.pdf *PDF)" );
QString initialFile = !mMapFileLineEdit->text().isEmpty() ? mMapFileLineEdit->text() : myLastUsedDir;
QString outputFileName = QFileDialog::getSaveFileName( this, tr( "Save Map File as" ), initialFile, tr( "PDF Format" ) + " (*.pdf *PDF)" );
if ( !outputFileName.isNull() )
{
if ( !outputFileName.endsWith( ".pdf", Qt::CaseInsensitive ) )
Expand All @@ -237,7 +238,8 @@ void QgsTransformSettingsDialog::on_tbnReportFile_clicked()
{
QSettings s;
QString myLastUsedDir = s.value( "/Plugin-GeoReferencer/lastPDFReportDir", "" ).toString();
QString outputFileName = QFileDialog::getSaveFileName( 0, tr( "Select save PDF file" ), myLastUsedDir, tr( "PDF Format" ) + " (*.pdf *PDF)" );
QString initialFile = !mReportFileLineEdit->text().isEmpty() ? mReportFileLineEdit->text() : myLastUsedDir;
QString outputFileName = QFileDialog::getSaveFileName( this, tr( "Save Report File as" ), initialFile, tr( "PDF Format" ) + " (*.pdf *PDF)" );
if ( !outputFileName.isNull() )
{
if ( !outputFileName.endsWith( ".pdf", Qt::CaseInsensitive ) )
Expand Down

0 comments on commit 1bdb426

Please sign in to comment.