mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2037 RFT Plot: Set formation case from plot
This commit is contained in:
parent
1e943e1607
commit
bac2d2b4b2
@ -260,7 +260,7 @@ void RimWellRftPlot::updateFormationNamesData() const
|
||||
{
|
||||
for (size_t i = 0; i < m_wellLogPlot->trackCount(); i++)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(i)->updateFormationNamesData(RimWellLogTrack::WELL_PATH, nullptr, QString(), 0);
|
||||
m_wellLogPlot->trackByIndex(i)->updateFormationNamesData(nullptr, RimWellLogTrack::WELL_PATH, nullptr, QString(), 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -282,9 +282,17 @@ void RimWellRftPlot::updateFormationNamesData() const
|
||||
trajectoryType = RimWellLogTrack::SIMULATION_WELL;
|
||||
}
|
||||
|
||||
RimCase* rimCase = nullptr;
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases(cases);
|
||||
if (!cases.empty())
|
||||
{
|
||||
rimCase = cases[0];
|
||||
}
|
||||
|
||||
if (m_wellLogPlot->trackCount() > 0)
|
||||
{
|
||||
m_wellLogPlot->trackByIndex(0)->updateFormationNamesData(trajectoryType, wellPath, m_wellName, m_branchIndex);
|
||||
m_wellLogPlot->trackByIndex(0)->updateFormationNamesData(rimCase, trajectoryType, wellPath, m_wellName, m_branchIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,9 +44,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellFlowRateCurve.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
@ -248,30 +246,6 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
}
|
||||
else if (changedField == &m_showFormations)
|
||||
{
|
||||
if (!m_formationCase && m_showFormations)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj)
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases(cases);
|
||||
if (!cases.empty())
|
||||
{
|
||||
m_formationCase = cases[0];
|
||||
}
|
||||
}
|
||||
|
||||
RimWellAllocationPlot* wellAllocationPlot;
|
||||
firstAncestorOrThisOfType(wellAllocationPlot);
|
||||
|
||||
if (wellAllocationPlot)
|
||||
{
|
||||
m_formationTrajectoryType = RimWellLogTrack::SIMULATION_WELL;
|
||||
m_simulationWellChosen = true;
|
||||
m_formationSimWellName = wellAllocationPlot->wellName();
|
||||
}
|
||||
}
|
||||
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
else if (changedField == &m_formationCase)
|
||||
@ -497,13 +471,15 @@ void RimWellLogTrack::loadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::updateFormationNamesData(TrajectoryType trajectoryType, RimWellPath* wellPath, QString simWellName, int branchIndex)
|
||||
void RimWellLogTrack::updateFormationNamesData(RimCase* rimCase, TrajectoryType trajectoryType, RimWellPath* wellPath, QString simWellName, int branchIndex)
|
||||
{
|
||||
m_formationCase = rimCase;
|
||||
m_formationTrajectoryType = trajectoryType;
|
||||
m_formationWellPath = wellPath;
|
||||
m_formationSimWellName = simWellName;
|
||||
m_formationBranchIndex = branchIndex;
|
||||
|
||||
updateConnectedEditors();
|
||||
updateFormationNamesOnPlot();
|
||||
}
|
||||
|
||||
@ -518,11 +494,19 @@ void RimWellLogTrack::setXAxisTitle(const QString& text)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setBranchIndex(int branchIndex)
|
||||
void RimWellLogTrack::setFormationBranchIndex(int branchIndex)
|
||||
{
|
||||
m_formationBranchIndex = branchIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimWellLogTrack::formationBranchIndex() const
|
||||
{
|
||||
return m_formationBranchIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -77,13 +77,14 @@ public:
|
||||
size_t curveIndex(RimWellLogCurve* curve);
|
||||
size_t curveCount() { return curves.size(); }
|
||||
void setXAxisTitle(const QString& text);
|
||||
void setBranchIndex(int branchIndex);
|
||||
void setFormationBranchIndex(int branchIndex);
|
||||
int formationBranchIndex() const;
|
||||
|
||||
void recreateViewer();
|
||||
void detachAllCurves();
|
||||
|
||||
void loadDataAndUpdate();
|
||||
void updateFormationNamesData(TrajectoryType trajectoryType, RimWellPath* wellPath, QString simWellName, int branchIndex);
|
||||
void updateFormationNamesData(RimCase* rimCase, TrajectoryType trajectoryType, RimWellPath* wellPath, QString simWellName, int branchIndex);
|
||||
|
||||
void availableDepthRange(double* minimumDepth, double* maximumDepth);
|
||||
void updateXZoomAndParentPlotDepthZoom();
|
||||
|
Loading…
Reference in New Issue
Block a user