mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2100 PLT plot. Remove branch index field
This commit is contained in:
parent
f131f1274a
commit
d277a08d29
@ -825,7 +825,7 @@ void RimWellAllocationPlot::updateFormationNamesData() const
|
||||
for (size_t i = 0; i < m_accumulatedWellFlowPlot->trackCount(); ++i)
|
||||
{
|
||||
RimWellLogTrack* track = m_accumulatedWellFlowPlot->trackByIndex(i);
|
||||
track->updateFormationNamesData(m_case, RimWellLogTrack::SIMULATION_WELL, nullptr, m_wellName, track->formationBranchIndex());
|
||||
track->setAndUpdateSimWellFormationNamesData(m_case, m_wellName, track->formationBranchIndex());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,6 @@ RimWellPltPlot::RimWellPltPlot()
|
||||
m_wellLogPlot.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellPathName, "WellName", "WellName", "", "", "");
|
||||
CAF_PDM_InitField(&m_branchIndex, "BranchIndex", 0, "BranchIndex", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_selectedSources, "SourcesInternal", "SourcesInternal", "", "", "");
|
||||
m_selectedSources.uiCapability()->setUiEditorTypeName(caf::PdmUiTreeSelectionEditor::uiEditorTypeName());
|
||||
@ -339,7 +338,7 @@ void RimWellPltPlot::updateFormationsOnPlot() const
|
||||
{
|
||||
for (size_t i = 0; i < m_wellLogPlot->trackCount(); i++)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(i)->updateFormationNamesData(nullptr, RimWellLogTrack::WELL_PATH, nullptr, QString(), 0);
|
||||
m_wellLogPlot->trackByIndex(i)->setAndUpdateWellPathFormationNamesData(nullptr, nullptr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -371,7 +370,7 @@ void RimWellPltPlot::updateFormationsOnPlot() const
|
||||
|
||||
if (m_wellLogPlot->trackCount() > 0)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(0)->updateFormationNamesData(rimCase, trajectoryType, wellPath, RimWellPlotTools::simWellName(m_wellPathName), m_branchIndex);
|
||||
m_wellLogPlot->trackByIndex(0)->setAndUpdateWellPathFormationNamesData(rimCase, wellPath);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1031,14 +1030,6 @@ QString RimWellPltPlot::currentWellName() const
|
||||
return m_wellPathName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimWellPltPlot::branchIndex() const
|
||||
{
|
||||
return m_branchIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1106,22 +1097,6 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
|
||||
{
|
||||
calculateValueOptionsForTimeSteps(m_wellPathName, options);
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_branchIndex)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
size_t branchCount = proj->simulationWellBranches(simWellName).size();
|
||||
|
||||
for (int bIdx = 0; bIdx < static_cast<int>(branchCount); ++bIdx)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo("Branch " + QString::number(bIdx + 1), QVariant::fromValue(bIdx)));
|
||||
}
|
||||
|
||||
if (options.size() == 0)
|
||||
{
|
||||
options.push_front(caf::PdmOptionItemInfo("None", -1));
|
||||
}
|
||||
}
|
||||
|
||||
if (fieldNeedingOptions == &m_phaseSelectionMode)
|
||||
{
|
||||
@ -1148,7 +1123,7 @@ void RimWellPltPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
setDescription(QString(plotNameFormatString()).arg(m_wellPathName));
|
||||
}
|
||||
|
||||
if (changedField == &m_wellPathName || changedField == &m_branchIndex)
|
||||
if (changedField == &m_wellPathName)
|
||||
{
|
||||
RimWellLogTrack* const plotTrack = m_wellLogPlot->trackByIndex(0);
|
||||
for (RimWellLogCurve* const curve : plotTrack->curvesVector())
|
||||
@ -1207,12 +1182,6 @@ void RimWellPltPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
uiOrdering.add(&m_userName);
|
||||
uiOrdering.add(&m_wellPathName);
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj->simulationWellBranches(simWellName).size() > 1)
|
||||
{
|
||||
uiOrdering.add(&m_branchIndex);
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* sourcesGroup = uiOrdering.addNewGroupWithKeyword("Sources", "Sources");
|
||||
sourcesGroup->add(&m_selectedSources);
|
||||
|
||||
|
@ -79,8 +79,7 @@ public:
|
||||
|
||||
void setCurrentWellName(const QString& currWellName);
|
||||
QString currentWellName() const;
|
||||
int branchIndex() const;
|
||||
|
||||
|
||||
static const char* plotNameFormatString();
|
||||
|
||||
//void applyInitialSelections();
|
||||
@ -146,7 +145,6 @@ private:
|
||||
caf::PdmField<QString> m_userName;
|
||||
|
||||
caf::PdmField<QString> m_wellPathName;
|
||||
caf::PdmField<int> m_branchIndex;
|
||||
|
||||
caf::PdmField<std::vector<RifWellRftAddress>> m_selectedSources;
|
||||
caf::PdmChildArrayField<RimRftAddress*> m_selectedSourcesForIo;
|
||||
|
@ -260,7 +260,7 @@ void RimWellRftPlot::updateFormationsOnPlot() const
|
||||
{
|
||||
for (size_t i = 0; i < m_wellLogPlot->trackCount(); i++)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(i)->updateFormationNamesData(nullptr, RimWellLogTrack::WELL_PATH, nullptr, QString(), 0);
|
||||
m_wellLogPlot->trackByIndex(i)->setAndUpdateWellPathFormationNamesData(nullptr, nullptr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -292,7 +292,14 @@ void RimWellRftPlot::updateFormationsOnPlot() const
|
||||
|
||||
if (m_wellLogPlot->trackCount() > 0)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(0)->updateFormationNamesData(rimCase, trajectoryType, wellPath, m_wellPathNameOrSimWellName, m_branchIndex);
|
||||
if (trajectoryType == RimWellLogTrack::SIMULATION_WELL)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(0)->setAndUpdateSimWellFormationNamesData(rimCase, m_wellPathNameOrSimWellName, m_branchIndex);
|
||||
}
|
||||
else if (trajectoryType == RimWellLogTrack::WELL_PATH)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(0)->setAndUpdateWellPathFormationNamesData(rimCase, wellPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -474,16 +474,35 @@ void RimWellLogTrack::loadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::updateFormationNamesData(RimCase* rimCase, TrajectoryType trajectoryType, RimWellPath* wellPath, QString simWellName, int branchIndex)
|
||||
void RimWellLogTrack::setAndUpdateWellPathFormationNamesData(RimCase* rimCase, RimWellPath* wellPath)
|
||||
{
|
||||
m_formationCase = rimCase;
|
||||
m_formationTrajectoryType = trajectoryType;
|
||||
m_formationTrajectoryType = RimWellLogTrack::WELL_PATH;
|
||||
m_formationWellPath = wellPath;
|
||||
m_formationSimWellName = "";
|
||||
m_formationBranchIndex = -1;
|
||||
|
||||
updateConnectedEditors();
|
||||
|
||||
if (m_showFormations)
|
||||
{
|
||||
updateFormationNamesOnPlot();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setAndUpdateSimWellFormationNamesData(RimCase* rimCase, QString simWellName, int branchIndex)
|
||||
{
|
||||
m_formationCase = rimCase;
|
||||
m_formationTrajectoryType = RimWellLogTrack::SIMULATION_WELL;
|
||||
m_formationWellPath = nullptr;
|
||||
m_formationSimWellName = simWellName;
|
||||
m_formationBranchIndex = branchIndex;
|
||||
|
||||
updateConnectedEditors();
|
||||
|
||||
|
||||
if (m_showFormations)
|
||||
{
|
||||
updateFormationNamesOnPlot();
|
||||
|
@ -84,8 +84,8 @@ public:
|
||||
void detachAllCurves();
|
||||
|
||||
void loadDataAndUpdate();
|
||||
void updateFormationNamesData(RimCase* rimCase, TrajectoryType trajectoryType, RimWellPath* wellPath, QString simWellName, int branchIndex);
|
||||
|
||||
void setAndUpdateWellPathFormationNamesData(RimCase* rimCase, RimWellPath* wellPath);
|
||||
void setAndUpdateSimWellFormationNamesData(RimCase* rimCase, QString simWellName, int branchIndex);
|
||||
void availableDepthRange(double* minimumDepth, double* maximumDepth);
|
||||
void updateXZoomAndParentPlotDepthZoom();
|
||||
void updateXZoom();
|
||||
|
Loading…
Reference in New Issue
Block a user