Skip to content
Permalink
Browse files

Fix raster calc dialog uses an open file dialog instead of save dialog

Fixes #18303

(cherry-picked from b5d9e7)
  • Loading branch information
nyalldawson committed Mar 1, 2018
1 parent d2bf8d0 commit 0246cd678c4c4696e637d5c24b48f629647ae336
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/app/qgsrastercalcdialog.cpp
@@ -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(); } );

0 comments on commit 0246cd6

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