Improve fault reactivation file names (#11005)

Use model name in exported file name.
Add model name to include file names.
This commit is contained in:
jonjenssen
2024-01-05 08:43:40 +01:00
committed by GitHub
parent 544e6974e7
commit daae1e6e05
9 changed files with 107 additions and 104 deletions

View File

@@ -48,13 +48,13 @@ void RicExportInpFileFeature::onActionTriggered( bool isChecked )
auto faultReactivationModel = caf::SelectionManager::instance()->selectedItemOfType<RimFaultReactivationModel>();
if ( faultReactivationModel )
{
QString exportFile = faultReactivationModel->baseDir() + "/faultreactivation.inp";
auto [isOk, errorMessage] = RifFaultReactivationModelExporter::exportToFile( exportFile.toStdString(), *faultReactivationModel );
auto [isOk, errorMessage] = RifFaultReactivationModelExporter::exportToFile( *faultReactivationModel );
if ( !isOk )
{
const QString frmTitle( "Fault Reactivation Modeling" );
QString outErrorText =
QString( "Failed to export INP model to file %1.\n\n%2" ).arg( exportFile ).arg( QString::fromStdString( errorMessage ) );
QString outErrorText = QString( "Failed to export INP model to file %1.\n\n%2" )
.arg( QString::fromStdString( faultReactivationModel->inputFilename() ) )
.arg( QString::fromStdString( errorMessage ) );
QMessageBox::critical( nullptr, frmTitle, outErrorText );
}
}