mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1174 Create TOF property filter with selected tracer
This commit is contained in:
@@ -250,6 +250,43 @@ void RimEclipseResultDefinition::updateAnyFieldHasChanged()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultDefinition::setTofAndSelectTracer(const QString& tracerName)
|
||||
{
|
||||
setResultType(RimDefines::FLOW_DIAGNOSTICS);
|
||||
setResultVariable("TOF");
|
||||
|
||||
m_flowTracerSelectionMode = FLOW_TR_BY_SELECTION;
|
||||
|
||||
std::vector<QString> tracers;
|
||||
tracers.push_back(tracerName);
|
||||
setSelectedTracers(tracers);
|
||||
|
||||
if (m_flowSolution() == nullptr)
|
||||
{
|
||||
assignFlowSolutionFromCase();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultDefinition::assignFlowSolutionFromCase()
|
||||
{
|
||||
RimEclipseResultCase* eclCase = nullptr;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
if (eclCase)
|
||||
{
|
||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
||||
if (flowSols.size() > 0)
|
||||
{
|
||||
this->setFlowSolution(flowSols[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -891,13 +928,7 @@ void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
|
||||
if ( m_flowSolution() == nullptr )
|
||||
{
|
||||
RimEclipseResultCase* eclCase;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
if ( eclCase )
|
||||
{
|
||||
std::vector<RimFlowDiagSolution*> flowSols = eclCase->flowDiagSolutions();
|
||||
if (flowSols.size()){ this->setFlowSolution(flowSols[0]); }
|
||||
}
|
||||
assignFlowSolutionFromCase();
|
||||
}
|
||||
}
|
||||
uiOrdering.add(&m_resultVariableUiField);
|
||||
|
||||
Reference in New Issue
Block a user