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:
@@ -22,6 +22,8 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPlotTools.h"
|
||||
#include "cafPdmUiOrdering.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -66,3 +68,27 @@ QList<caf::PdmOptionItemInfo> RiaSimWellBranchTools::valueOptionsForBranchIndexF
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequired(caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& wellPathOrSimWellName,
|
||||
const caf::PdmField<bool>& branchDetectionField,
|
||||
const caf::PdmField<int>& branchIndexField)
|
||||
{
|
||||
if (!RimWellPlotTools::hasAssociatedWellPath(wellPathOrSimWellName))
|
||||
{
|
||||
const QString simWellName = RimWellPlotTools::simWellName(wellPathOrSimWellName);
|
||||
|
||||
if (RiaSimWellBranchTools::simulationWellBranches(simWellName, true).size() > 1)
|
||||
{
|
||||
uiOrdering->add(&branchDetectionField);
|
||||
|
||||
if (RiaSimWellBranchTools::simulationWellBranches(simWellName, branchDetectionField).size() > 1)
|
||||
{
|
||||
uiOrdering->add(&branchIndexField);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user