#8012 Ensemble Well Log : Close case after well log extraction

This commit is contained in:
Magne Sjaastad 2021-09-15 11:46:24 +02:00
parent cd91a96871
commit 6ab8d59283

View File

@ -24,6 +24,7 @@
#include "RiaLogging.h" #include "RiaLogging.h"
#include "ExportCommands/RicExportToLasFileFeature.h" #include "ExportCommands/RicExportToLasFileFeature.h"
#include "RicCloseCaseFeature.h"
#include "RicCreateEnsembleWellLogUi.h" #include "RicCreateEnsembleWellLogUi.h"
#include "RicImportEnsembleWellLogsFeature.h" #include "RicImportEnsembleWellLogsFeature.h"
#include "RicRecursiveFileSearchDialog.h" #include "RicRecursiveFileSearchDialog.h"
@ -121,7 +122,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
RimWellPath* wellPath = wellPaths[0]; RimWellPath* wellPath = wellPaths[0];
QStringList allLasFileNames; QStringList allLasFileNames;
for ( auto fileName : fileNames ) for ( const auto& fileName : fileNames )
{ {
auto task = progress.task( QString( "Extracting well log for %1" ).arg( fileName ) ); auto task = progress.task( QString( "Extracting well log for %1" ).arg( fileName ) );
@ -143,7 +144,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
RimcWellLogPlot_newWellLogTrack::createWellLogTrack( wellLogPlot, eclipseCase, wellPath, title ); RimcWellLogPlot_newWellLogTrack::createWellLogTrack( wellLogPlot, eclipseCase, wellPath, title );
// Create a well log curve for each property // Create a well log curve for each property
for ( auto property : properties ) for ( const auto& property : properties )
{ {
QString propertyName = property.first; QString propertyName = property.first;
RiaDefines::ResultCatType resultCategoryType = property.second; RiaDefines::ResultCatType resultCategoryType = property.second;
@ -187,12 +188,14 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
alwaysOverwrite, alwaysOverwrite,
resampleInterval, resampleInterval,
convertCurveUnits ); convertCurveUnits );
for ( auto lasFile : lasFiles ) for ( const auto& lasFile : lasFiles )
allLasFileNames << lasFile; allLasFileNames << lasFile;
} }
// Remove the temporary plots after export // Remove the temporary plots after export
plotCollection->removePlot( wellLogPlot ); plotCollection->removePlot( wellLogPlot );
RicCloseCaseFeature::deleteEclipseCase( eclipseCase );
} }
if ( ui.autoCreateEnsembleWellLogs() ) if ( ui.autoCreateEnsembleWellLogs() )
@ -208,7 +211,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
RimcWellLogPlotCollection_newWellLogPlot::createWellLogPlot( plotCollection, wellPath, eclipseCase ); RimcWellLogPlotCollection_newWellLogPlot::createWellLogPlot( plotCollection, wellPath, eclipseCase );
// Create a track per property // Create a track per property
for ( auto property : properties ) for ( const auto& property : properties )
{ {
// Create well log track // Create well log track
cvf::Color3f color = RiaColorTables::normalPaletteColors().cycledColor3f( wellLogPlot->plotCount() ); cvf::Color3f color = RiaColorTables::normalPaletteColors().cycledColor3f( wellLogPlot->plotCount() );