mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3605 Temp LGR. Delete existing temp LGRs when creating new
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user