Skip to content
Permalink
Browse files

[georef] Improve behaviour for selecting map and report filename

  • Loading branch information
nyalldawson committed Jun 17, 2015
1 parent c4f0d31 commit 1bdb4261154cb0a77c3d90c59fa9dc1b83ced3f4
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/plugins/georeferencer/qgstransformsettingsdialog.cpp
@@ -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 ) )
@@ -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 ) )

0 comments on commit 1bdb426

Please sign in to comment.
You can’t perform that action at this time.