#3605 Temp LGR. Delete existing temp LGRs when creating new

This commit is contained in:
Bjørn Erik Jensen
2018-11-07 07:46:33 +01:00
parent 7d9c858f13
commit 9b42c9fde6
4 changed files with 19 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
#include "RicfCommandFileExecutor.h" #include "RicfCommandFileExecutor.h"
#include "RicfCreateMultipleFractures.h" #include "RicfCreateMultipleFractures.h"
#include "RicDeleteTemporaryLgrsFeature.h"
#include "RicCreateTemporaryLgrFeature.h" #include "RicCreateTemporaryLgrFeature.h"
#include "ExportCommands/RicExportLgrFeature.h" #include "ExportCommands/RicExportLgrFeature.h"
@@ -83,6 +84,8 @@ void RicfCreateLgrForCompletions::execute()
} }
} }
RicDeleteTemporaryLgrsFeature::deleteAllTemporaryLgrs(eclipseCase);
caf::VecIjk lgrCellCounts(m_refinementI, m_refinementJ, m_refinementK); caf::VecIjk lgrCellCounts(m_refinementI, m_refinementJ, m_refinementK);
QStringList wellsWithIntersectingLgrs; QStringList wellsWithIntersectingLgrs;
for (const auto wellPath : wellPaths) for (const auto wellPath : wellPaths)

View File

@@ -23,6 +23,7 @@
#include "RiaCompletionTypeCalculationScheduler.h" #include "RiaCompletionTypeCalculationScheduler.h"
#include "RiaLogging.h" #include "RiaLogging.h"
#include "RicDeleteTemporaryLgrsFeature.h"
#include "CompletionExportCommands/RicWellPathExportCompletionDataFeature.h" #include "CompletionExportCommands/RicWellPathExportCompletionDataFeature.h"
#include "ExportCommands/RicExportLgrFeature.h" #include "ExportCommands/RicExportLgrFeature.h"
#include "ExportCommands/RicExportLgrUi.h" #include "ExportCommands/RicExportLgrUi.h"
@@ -171,6 +172,8 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
auto splitType = dialogData->splitType(); auto splitType = dialogData->splitType();
const auto completionTypes = dialogData->completionTypes(); const auto completionTypes = dialogData->completionTypes();
RicDeleteTemporaryLgrsFeature::deleteAllTemporaryLgrs(eclipseCase);
bool intersectingOtherLgrs = false; bool intersectingOtherLgrs = false;
for (const auto& wellPath : wellPaths) for (const auto& wellPath : wellPaths)
{ {

View File

@@ -29,6 +29,14 @@
CAF_CMD_SOURCE_INIT(RicDeleteTemporaryLgrsFeature, "RicDeleteTemporaryLgrsFeature"); CAF_CMD_SOURCE_INIT(RicDeleteTemporaryLgrsFeature, "RicDeleteTemporaryLgrsFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicDeleteTemporaryLgrsFeature::deleteAllTemporaryLgrs(RimEclipseCase* eclipseCase)
{
if (eclipseCase) eclipseCase->reloadDataAndUpdate();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -49,7 +57,7 @@ void RicDeleteTemporaryLgrsFeature::onActionTriggered(bool isChecked)
RimEclipseCase* eclipseCase; RimEclipseCase* eclipseCase;
selGridInfos.front()->firstAncestorOrThisOfType(eclipseCase); selGridInfos.front()->firstAncestorOrThisOfType(eclipseCase);
if (eclipseCase) eclipseCase->reloadDataAndUpdate(); deleteAllTemporaryLgrs(eclipseCase);
} }
} }

View File

@@ -21,10 +21,14 @@
#include "cafCmdFeature.h" #include "cafCmdFeature.h"
class RimEclipseCase;
class RicDeleteTemporaryLgrsFeature : public caf::CmdFeature class RicDeleteTemporaryLgrsFeature : public caf::CmdFeature
{ {
CAF_CMD_HEADER_INIT; CAF_CMD_HEADER_INIT;
static void deleteAllTemporaryLgrs(RimEclipseCase* eclipseCase);
protected: protected:
bool isCommandEnabled() override; bool isCommandEnabled() override;
void onActionTriggered(bool isChecked) override; void onActionTriggered(bool isChecked) override;