mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1202 Flow: Handle separate phase solutions
This commit is contained in:
@@ -82,6 +82,7 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
|
||||
m_selectedTracers.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_flowTracerSelectionMode, "FlowTracerSelectionMode", "Tracers", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_phaseSelection, "PhaseSelection", "Phases", "", "", "");
|
||||
|
||||
// Ui only fields
|
||||
|
||||
@@ -131,6 +132,7 @@ void RimEclipseResultDefinition::simpleCopy(const RimEclipseResultDefinition* ot
|
||||
this->setFlowSolution(other->m_flowSolution());
|
||||
this->setSelectedTracers(other->m_selectedTracers());
|
||||
m_flowTracerSelectionMode = other->m_flowTracerSelectionMode();
|
||||
m_phaseSelection = other->m_phaseSelection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -239,6 +241,11 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
if (&m_phaseSelection == changedField)
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
if (&m_selectedTracersUiFieldFilter == changedField)
|
||||
{
|
||||
auto visibleTracerNames = tracerNamesMatchingFilter();
|
||||
@@ -713,7 +720,7 @@ RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const
|
||||
}
|
||||
}
|
||||
|
||||
return RigFlowDiagResultAddress(m_resultVariable().toStdString(), selTracerNames);
|
||||
return RigFlowDiagResultAddress(m_resultVariable().toStdString(), m_phaseSelection(), selTracerNames);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1020,6 +1027,8 @@ void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
uiOrdering.add(&m_selectedTracersUiField);
|
||||
}
|
||||
|
||||
uiOrdering.add(&m_phaseSelection);
|
||||
|
||||
if ( m_flowSolution() == nullptr )
|
||||
{
|
||||
assignFlowSolutionFromCase();
|
||||
|
||||
Reference in New Issue
Block a user