diff --git a/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp b/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp index c17e260c82..ead9acf4b6 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp @@ -508,6 +508,8 @@ bool RimSimWellInView::isWellPipeVisible( size_t frameIndex ) const if ( !showWellPipe() ) return false; + if ( reservoirView->wellCollection()->showOnlyActiveWells() && !simWellData()->isOpen( frameIndex ) ) return false; + if ( reservoirView->intersectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true; if ( reservoirView->wellCollection()->showWellsIntersectingVisibleCells() && @@ -548,6 +550,8 @@ bool RimSimWellInView::isWellSpheresVisible( size_t frameIndex ) const if ( !showWellSpheres() ) return false; + if ( reservoirView->wellCollection()->showOnlyActiveWells() && !simWellData()->isOpen( frameIndex ) ) return false; + if ( reservoirView->intersectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true; if ( reservoirView->wellCollection()->showWellsIntersectingVisibleCells() && reservoirView->cellFilterCollection()->hasActiveFilters() ) @@ -586,6 +590,8 @@ bool RimSimWellInView::isWellValvesVisible( size_t frameIndex ) const if ( !reservoirView->wellCollection()->isActive() ) return false; if ( !reservoirView->wellCollection()->showValves() ) return false; + if ( reservoirView->wellCollection()->showOnlyActiveWells() && !simWellData()->isOpen( frameIndex ) ) return false; + if ( reservoirView->intersectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true; if ( reservoirView->wellCollection()->showWellsIntersectingVisibleCells() && reservoirView->cellFilterCollection()->hasActiveFilters() ) @@ -664,6 +670,8 @@ bool RimSimWellInView::isWellDiskVisible( size_t frameIndex ) const if ( !showWellDisks() ) return false; + if ( reservoirView->wellCollection()->showOnlyActiveWells() && !simWellData()->isOpen( frameIndex ) ) return false; + if ( reservoirView->intersectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true; if ( reservoirView->wellCollection()->showWellsIntersectingVisibleCells() && diff --git a/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp index ddb92b442b..8aa05c7e33 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp @@ -144,6 +144,8 @@ RimSimWellInViewCollection::RimSimWellInViewCollection() // CAF_PDM_InitField(&showWellsIntersectingVisibleCells, "ShowWellsIntersectingVisibleCells", false, "Hide Wells // Missing Visible Cells"); + CAF_PDM_InitField( &m_showOnlyActiveWells, "ShowOnlyActiveWells", false, "Active Wells Only" ); + // Appearance CAF_PDM_InitFieldNoDefault( &m_showWellHead, "ShowWellHeadTristate", "Well Head" ); CAF_PDM_InitFieldNoDefault( &m_showWellLabel, "ShowWellLabelTristate", "Label" ); @@ -404,7 +406,7 @@ void RimSimWellInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch } if ( &isActive == changedField || &m_showWellCells == changedField || &m_showWellCellFence == changedField || - &wellCellFenceType == changedField || &showWellsIntersectingVisibleCells == changedField ) + &wellCellFenceType == changedField || &showWellsIntersectingVisibleCells == changedField || &m_showOnlyActiveWells == changedField ) { m_reservoirView->scheduleGeometryRegen( VISIBLE_WELL_CELLS ); m_reservoirView->scheduleCreateDisplayModelAndRedraw(); @@ -611,6 +613,7 @@ void RimSimWellInViewCollection::defineUiOrdering( QString uiConfigName, caf::Pd if ( !isContourMap ) { appearanceGroup->add( &showWellsIntersectingVisibleCells ); + appearanceGroup->add( &m_showOnlyActiveWells ); } appearanceGroup->add( &m_showWellLabel ); appearanceGroup->add( &m_showWellHead ); diff --git a/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.h b/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.h index 9d3feb7e2e..28404a6408 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.h +++ b/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.h @@ -125,6 +125,7 @@ class RimSimWellInViewCollection : public caf::PdmObject bool showWellCells(); bool showWellCommunicationLines() { return m_showWellCommunicationLines(); } + bool showOnlyActiveWells() const { return m_showOnlyActiveWells(); } caf::PdmField wellCellFenceType; caf::PdmField wellCellTransparencyLevel; @@ -199,6 +200,7 @@ class RimSimWellInViewCollection : public caf::PdmObject caf::PdmField m_showWellValves; caf::PdmField m_showWellCommunicationLines; + caf::PdmField m_showOnlyActiveWells; // Well Discs caf::PdmField> m_wellDiskPropertyType;