mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor connection between cases and views.
Eclipse grid views and contour maps are not longer a child of the case. The views are not separate collections (one for grid and one for contour maps) on root level.
This commit is contained in:
@@ -145,7 +145,7 @@ void RimFlowCharacteristicsPlot::setFromFlowSolution( RimFlowDiagSolution* flowS
|
||||
{
|
||||
auto eclCase = flowSolution->firstAncestorOrThisOfType<RimEclipseResultCase>();
|
||||
m_case = eclCase;
|
||||
if ( !eclCase->reservoirViews.empty() )
|
||||
if ( !eclCase->reservoirViews().empty() )
|
||||
{
|
||||
m_cellFilterView = eclCase->reservoirViews()[0];
|
||||
}
|
||||
@@ -399,7 +399,7 @@ void RimFlowCharacteristicsPlot::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
{
|
||||
m_case = defaultCase;
|
||||
m_flowDiagSolution = m_case->defaultFlowDiagSolution();
|
||||
if ( !m_case()->reservoirViews.empty() )
|
||||
if ( !m_case()->reservoirViews().empty() )
|
||||
{
|
||||
m_cellFilterView = m_case()->reservoirViews()[0];
|
||||
}
|
||||
@@ -506,7 +506,7 @@ void RimFlowCharacteristicsPlot::fieldChangedByUi( const caf::PdmFieldHandle* ch
|
||||
{
|
||||
m_flowDiagSolution = m_case->defaultFlowDiagSolution();
|
||||
m_currentlyPlottedTimeSteps.clear();
|
||||
if ( !m_case()->reservoirViews.empty() )
|
||||
if ( !m_case()->reservoirViews().empty() )
|
||||
{
|
||||
m_cellFilterView = m_case()->reservoirViews()[0];
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@ QList<caf::PdmOptionItemInfo> RimWellConnectivityTable::calculateValueOptions( c
|
||||
else if ( fieldNeedingOptions == &m_cellFilterView && m_case() )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( "Disabled", nullptr ) );
|
||||
for ( RimEclipseView* view : m_case()->reservoirViews.childrenByType() )
|
||||
for ( RimEclipseView* view : m_case()->reservoirViews() )
|
||||
{
|
||||
CVF_ASSERT( view && "Really always should have a valid view pointer in ReservoirViews" );
|
||||
options.push_back( caf::PdmOptionItemInfo( view->name(), view, false, view->uiIconProvider() ) );
|
||||
|
||||
Reference in New Issue
Block a user