mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1422 WLP: Set case and flow diag solution in resultDefinition when switching case in gui. Use the case from the result definition instead of wrong search when updating default flow solution
This commit is contained in:
parent
c23ac3c8ae
commit
009218e3ec
@ -137,6 +137,8 @@ void RimEclipseResultDefinition::simpleCopy(const RimEclipseResultDefinition* ot
|
||||
void RimEclipseResultDefinition::setEclipseCase(RimEclipseCase* eclipseCase)
|
||||
{
|
||||
m_eclipseCase = eclipseCase;
|
||||
|
||||
assignFlowSolutionFromCase();
|
||||
}
|
||||
|
||||
|
||||
@ -323,16 +325,15 @@ void RimEclipseResultDefinition::setTofAndSelectTracer(const QString& tracerName
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultDefinition::assignFlowSolutionFromCase()
|
||||
{
|
||||
RimEclipseResultCase* eclCase = nullptr;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
RimFlowDiagSolution* defaultFlowDiagSolution = nullptr;
|
||||
|
||||
RimEclipseResultCase* eclCase = dynamic_cast<RimEclipseResultCase*>(m_eclipseCase.p());
|
||||
|
||||
if (eclCase)
|
||||
{
|
||||
RimFlowDiagSolution* defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
||||
if (defaultFlowDiagSolution)
|
||||
{
|
||||
this->setFlowSolution(defaultFlowDiagSolution);
|
||||
}
|
||||
defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
||||
}
|
||||
this->setFlowSolution(defaultFlowDiagSolution);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -464,8 +465,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_flowSolutionUiField)
|
||||
{
|
||||
RimEclipseResultCase* eclCase;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
RimEclipseResultCase* eclCase = dynamic_cast<RimEclipseResultCase*>(m_eclipseCase.p());
|
||||
if (eclCase)
|
||||
{
|
||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
||||
|
Loading…
Reference in New Issue
Block a user