Skip to content

Commit

Permalink
Fix raster calc dialog uses an open file dialog instead of save dialog
Browse files Browse the repository at this point in the history
Fixes #18303
  • Loading branch information
nyalldawson committed Mar 2, 2018
1 parent baeaeac commit b5d9e7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/qgsrastercalcdialog.cpp
Expand Up @@ -77,6 +77,7 @@ QgsRasterCalcDialog::QgsRasterCalcDialog( QgsRasterLayer *rasterLayer, QWidget *
mExpressionTextEdit->setCurrentFont( QFontDatabase::systemFont( QFontDatabase::FixedFont ) );

QgsSettings settings;
mOutputLayer->setStorageMode( QgsFileWidget::SaveFile );
mOutputLayer->setDialogTitle( tr( "Enter result file" ) );
mOutputLayer->setDefaultRoot( settings.value( QStringLiteral( "/RasterCalculator/lastOutputDir" ), QDir::homePath() ).toString() );
connect( mOutputLayer, &QgsFileWidget::fileChanged, this, [ = ]() { setAcceptButtonState(); } );
Expand Down

1 comment on commit b5d9e7a

@nirvn
Copy link
Contributor

@nirvn nirvn commented on b5d9e7a Mar 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson , my bad, thanks for fixing.

Please sign in to comment.