Skip to content
Permalink
Browse files

Fix #3411

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15113 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Feb 1, 2011
1 parent d4caf58 commit 890b9323da044f730274010509678c2e87fa5a87
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisdialog.cpp
@@ -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 );
@@ -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 )

0 comments on commit 890b932

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