mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2127 Sim Well Branches : Move logic related to uiOrdering to RiaSimWellBranchTools
This commit is contained in:
parent
9c4077a040
commit
0e5e88008a
@ -72,23 +72,37 @@ QList<caf::PdmOptionItemInfo> RiaSimWellBranchTools::valueOptionsForBranchIndexF
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequired(caf::PdmUiOrdering* uiOrdering,
|
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName(caf::PdmUiOrdering* uiOrdering,
|
||||||
const QString& wellPathOrSimWellName,
|
const QString& wellPathOrSimWellName,
|
||||||
const caf::PdmField<bool>& branchDetectionField,
|
const caf::PdmField<bool>& branchDetectionField,
|
||||||
const caf::PdmField<int>& branchIndexField)
|
const caf::PdmField<int>& branchIndexField)
|
||||||
{
|
{
|
||||||
if (!RimWellPlotTools::hasAssociatedWellPath(wellPathOrSimWellName))
|
if (!RimWellPlotTools::hasAssociatedWellPath(wellPathOrSimWellName))
|
||||||
{
|
{
|
||||||
const QString simWellName = RimWellPlotTools::simWellName(wellPathOrSimWellName);
|
const QString simWellName = RimWellPlotTools::simWellName(wellPathOrSimWellName);
|
||||||
|
|
||||||
if (RiaSimWellBranchTools::simulationWellBranches(simWellName, true).size() > 1)
|
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName(uiOrdering,
|
||||||
{
|
simWellName,
|
||||||
uiOrdering->add(&branchDetectionField);
|
branchDetectionField,
|
||||||
|
branchIndexField);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (RiaSimWellBranchTools::simulationWellBranches(simWellName, branchDetectionField).size() > 1)
|
//--------------------------------------------------------------------------------------------------
|
||||||
{
|
///
|
||||||
uiOrdering->add(&branchIndexField);
|
//--------------------------------------------------------------------------------------------------
|
||||||
}
|
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName(caf::PdmUiOrdering* uiOrdering,
|
||||||
|
const QString& simWellName,
|
||||||
|
const caf::PdmField<bool>& branchDetectionField,
|
||||||
|
const caf::PdmField<int>& branchIndexField)
|
||||||
|
{
|
||||||
|
if (RiaSimWellBranchTools::simulationWellBranches(simWellName, true).size() > 1)
|
||||||
|
{
|
||||||
|
uiOrdering->add(&branchDetectionField);
|
||||||
|
|
||||||
|
if (RiaSimWellBranchTools::simulationWellBranches(simWellName, branchDetectionField).size() > 1)
|
||||||
|
{
|
||||||
|
uiOrdering->add(&branchIndexField);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,11 @@ public:
|
|||||||
static QList<caf::PdmOptionItemInfo>
|
static QList<caf::PdmOptionItemInfo>
|
||||||
valueOptionsForBranchIndexField(const std::vector<const RigWellPath*>& simulationWellPaths);
|
valueOptionsForBranchIndexField(const std::vector<const RigWellPath*>& simulationWellPaths);
|
||||||
|
|
||||||
static void appendSimWellBranchFieldsIfRequired(caf::PdmUiOrdering* uiOrdering, const QString& wellPathOrSimWellName,
|
static void appendSimWellBranchFieldsIfRequiredFromWellName(caf::PdmUiOrdering* uiOrdering, const QString& wellPathOrSimWellName,
|
||||||
|
const caf::PdmField<bool>& branchDetectionField,
|
||||||
|
const caf::PdmField<int>& branchIndexField);
|
||||||
|
|
||||||
|
static void appendSimWellBranchFieldsIfRequiredFromSimWellName(caf::PdmUiOrdering* uiOrdering, const QString& simWellName,
|
||||||
const caf::PdmField<bool>& branchDetectionField,
|
const caf::PdmField<bool>& branchDetectionField,
|
||||||
const caf::PdmField<int>& branchIndexField);
|
const caf::PdmField<int>& branchIndexField);
|
||||||
};
|
};
|
||||||
|
@ -759,10 +759,10 @@ void RimWellRftPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
uiOrdering.add(&m_userName);
|
uiOrdering.add(&m_userName);
|
||||||
uiOrdering.add(&m_wellPathNameOrSimWellName);
|
uiOrdering.add(&m_wellPathNameOrSimWellName);
|
||||||
|
|
||||||
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequired(&uiOrdering,
|
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName(&uiOrdering,
|
||||||
m_wellPathNameOrSimWellName,
|
m_wellPathNameOrSimWellName,
|
||||||
m_branchDetection,
|
m_branchDetection,
|
||||||
m_branchIndex);
|
m_branchIndex);
|
||||||
|
|
||||||
caf::PdmUiGroup* sourcesGroup = uiOrdering.addNewGroupWithKeyword("Sources", "Sources");
|
caf::PdmUiGroup* sourcesGroup = uiOrdering.addNewGroupWithKeyword("Sources", "Sources");
|
||||||
sourcesGroup->add(&m_selectedSources);
|
sourcesGroup->add(&m_selectedSources);
|
||||||
|
@ -353,15 +353,11 @@ void RimWellLogRftCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
|
|||||||
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data");
|
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data");
|
||||||
curveDataGroup->add(&m_eclipseResultCase);
|
curveDataGroup->add(&m_eclipseResultCase);
|
||||||
curveDataGroup->add(&m_wellName);
|
curveDataGroup->add(&m_wellName);
|
||||||
if (!RimWellPlotTools::hasAssociatedWellPath(m_wellName))
|
|
||||||
{
|
|
||||||
curveDataGroup->add(&m_branchDetection);
|
|
||||||
|
|
||||||
if (RiaSimWellBranchTools::simulationWellBranches(RimWellPlotTools::simWellName(m_wellName), m_branchDetection).size() > 1)
|
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName(curveDataGroup,
|
||||||
{
|
m_wellName,
|
||||||
curveDataGroup->add(&m_branchIndex);
|
m_branchDetection,
|
||||||
}
|
m_branchIndex);
|
||||||
}
|
|
||||||
|
|
||||||
curveDataGroup->add(&m_wellLogChannelName);
|
curveDataGroup->add(&m_wellLogChannelName);
|
||||||
curveDataGroup->add(&m_timeStep);
|
curveDataGroup->add(&m_timeStep);
|
||||||
|
@ -727,13 +727,11 @@ void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
formationGroup->add(&m_formationSimWellName);
|
formationGroup->add(&m_formationSimWellName);
|
||||||
formationGroup->add(&m_formationBranchDetection);
|
|
||||||
|
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName(formationGroup,
|
||||||
auto simulationWellBranches = RiaSimWellBranchTools::simulationWellBranches(m_formationSimWellName(), m_formationBranchDetection);
|
m_formationSimWellName,
|
||||||
if (simulationWellBranches.size() > 1)
|
m_formationBranchDetection,
|
||||||
{
|
m_formationBranchIndex);
|
||||||
formationGroup->add(&m_formationBranchIndex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (m_formationSource() == WELL_PICK)
|
else if (m_formationSource() == WELL_PICK)
|
||||||
|
Loading…
Reference in New Issue
Block a user