Skip to content

Commit

Permalink
Fix #3411
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15113 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 1, 2011
1 parent d4caf58 commit 890b932
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ bool QgsRasterTerrainAnalysisDialog::addLayerToProject() const

void QgsRasterTerrainAnalysisDialog::on_mOutputLayerPushButton_clicked()
{
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ) );
QSettings s;
QString lastDir = s.value( "/RasterTerrainAnalysis/lastOutputDir" ).toString();
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), lastDir );
if ( !saveFileName.isNull() )
{
mOutputLayerLineEdit->setText( saveFileName );
Expand All @@ -181,6 +183,13 @@ void QgsRasterTerrainAnalysisDialog::on_mButtonBox_accepted()
//save last output format
QSettings s;
s.setValue( "/RasterTerrainAnalysis/lastOutputFormat", QVariant( mOutputFormatComboBox->currentText() ) );

//save last output directory
QFileInfo outputFileInfo( mOutputLayerLineEdit->text() );
if ( outputFileInfo.exists() )
{
s.setValue( "/RasterTerrainAnalysis/lastOutputDir", QVariant( outputFileInfo.absolutePath() ) );
}
}

void QgsRasterTerrainAnalysisDialog::on_mOutputLayerLineEdit_textChanged( const QString& text )
Expand Down

0 comments on commit 890b932

Please sign in to comment.