Skip to content
Permalink
Browse files
change output file extension in mesh calculator when output format is
changed and driver metadata contains output extension (fix #41943)
  • Loading branch information
alexbruy authored and nyalldawson committed Jan 5, 2022
1 parent ca7b800 commit fd351dfdf4a0b7b7925cb17c4ce4168a14738c39
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/app/mesh/qgsmeshcalculatordialog.cpp
@@ -371,6 +371,13 @@ void QgsMeshCalculatorDialog::onOutputFormatChange()
QString filter = mOutputFormatComboBox->currentText();
filter.append( QStringLiteral( " (*.%1)" ).arg( suffix ) );
mOutputDatasetFileWidget->setFilter( filter );

// if output filename is already defined we need to replace old suffix
QString fileName = mOutputDatasetFileWidget->filePath();
if ( !fileName.isEmpty() )
{
mOutputDatasetFileWidget->setFilePath( controlSuffix( fileName ) );
}
}
else
{

0 comments on commit fd351df

Please sign in to comment.