mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
MswRollUp: Splitted normal well and MSW handling. Got the Normal path to work fairly well. Some strangeties at the end of the pipes though
This is an intermediate commit and does not compile p4#: 22214
This commit is contained in:
@@ -66,16 +66,6 @@ namespace caf
|
||||
}
|
||||
}
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RimWellCollection::WellHeadPositionEnum::setUp()
|
||||
{
|
||||
addItem(RimWellCollection::WELLHEAD_POS_ACTIVE_CELLS_BB, "WELLHEAD_POS_ACTIVE_CELLS_BB", "Top of active cells BB");
|
||||
addItem(RimWellCollection::WELLHEAD_POS_TOP_COLUMN, "WELLHEAD_POS_TOP_COLUMN", "Top of active cells IJ-column");
|
||||
setDefault(RimWellCollection::WELLHEAD_POS_TOP_COLUMN);
|
||||
}
|
||||
}
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellCollection, "Wells");
|
||||
|
||||
@@ -86,13 +76,12 @@ RimWellCollection::RimWellCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Wells", ":/WellCollection.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||
isActive.setUiHidden(true);
|
||||
CAF_PDM_InitField(&active, "Active", true, "Active", "", "", "");
|
||||
active.setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Show well heads", "", "", "");
|
||||
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well labels", "", "", "");
|
||||
CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well head scale", "", "", "");
|
||||
CAF_PDM_InitField(&wellHeadPosition, "WellHeadPosition", WellHeadPositionEnum(WELLHEAD_POS_TOP_COLUMN), "Well head position", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_OPEN_IN_VISIBLE_CELLS), "Global well pipe visibility", "", "", "");
|
||||
|
||||
@@ -141,7 +130,6 @@ RimWell* RimWellCollection::findWell(QString name)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellCollection::hasVisibleWellCells()
|
||||
{
|
||||
if (!this->isActive()) return false;
|
||||
if (this->wellCellsToRangeFilterMode() == RANGE_ADD_NONE) return false;
|
||||
if (this->wells().size() == 0 ) return false;
|
||||
|
||||
@@ -156,7 +144,7 @@ bool RimWellCollection::hasVisibleWellCells()
|
||||
const RigWellResultFrame& wellResultFrame = well->wellResults()->m_wellCellsTimeSteps[tIdx];
|
||||
for (size_t wsIdx = 0; !hasCells && wsIdx < wellResultFrame.m_wellResultBranches.size(); ++wsIdx)
|
||||
{
|
||||
if (wellResultFrame.m_wellResultBranches[wsIdx].m_wellCells.size() > 0 ) hasCells = true;
|
||||
if (wellResultFrame.m_wellResultBranches[wsIdx].m_branchResultPoints.size() > 0 ) hasCells = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,7 +164,7 @@ bool RimWellCollection::hasVisibleWellCells()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellCollection::hasVisibleWellPipes()
|
||||
{
|
||||
if (!this->isActive()) return false;
|
||||
if (!this->active()) return false;
|
||||
if (this->wellPipeVisibility() == PIPES_FORCE_ALL_OFF) return false;
|
||||
if (this->wells().size() == 0 ) return false;
|
||||
if (this->wellPipeVisibility() == PIPES_FORCE_ALL_ON) return true;
|
||||
@@ -190,13 +178,12 @@ bool RimWellCollection::hasVisibleWellPipes()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (&showWellLabel == changedField || &isActive == changedField)
|
||||
if (&showWellLabel == changedField || &active == changedField)
|
||||
{
|
||||
this->updateUiIconFromState(isActive);
|
||||
this->updateUiIconFromState(active);
|
||||
|
||||
if (m_reservoirView)
|
||||
{
|
||||
m_reservoirView->scheduleGeometryRegen(RivReservoirViewPartMgr::VISIBLE_WELL_CELLS);
|
||||
m_reservoirView->createDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
@@ -242,8 +229,7 @@ void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
||||
|| &pipeRadiusScaleFactor == changedField
|
||||
|| &wellHeadScaleFactor == changedField
|
||||
|| &showWellHead == changedField
|
||||
|| &isAutoDetectingBranches == changedField
|
||||
|| &wellHeadPosition == changedField)
|
||||
|| &isAutoDetectingBranches == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
@@ -290,7 +276,7 @@ void RimWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellCollection::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
return &active;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user