Skip to content

Commit

Permalink
change output file extension in mesh calculator when output format is
Browse files Browse the repository at this point in the history
changed and driver metadata contains output extension (fix #41943)
  • Loading branch information
alexbruy authored and nyalldawson committed Jan 5, 2022
1 parent ca7b800 commit fd351df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/mesh/qgsmeshcalculatordialog.cpp
Expand Up @@ -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
{
Expand Down

0 comments on commit fd351df

Please sign in to comment.