mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2039 PLT Plot: Move formation logic from track to plot
This commit is contained in:
parent
7be8227efa
commit
99f6d21e68
@ -346,6 +346,51 @@ std::vector<RimEclipseCase*> RimWellPltPlot::eclipseCases() const
|
|||||||
return cases;
|
return cases;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellPltPlot::updateFormationNamesData() const
|
||||||
|
{
|
||||||
|
if (m_selectedTimeSteps().empty())
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < m_wellLogPlot->trackCount(); i++)
|
||||||
|
{
|
||||||
|
m_wellLogPlot->trackByIndex(i)->updateFormationNamesData(nullptr, RimWellLogTrack::WELL_PATH, nullptr, QString(), 0);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
|
RimOilField* oilField = proj->activeOilField();
|
||||||
|
|
||||||
|
RimWellPathCollection* wellPathCollection = oilField->wellPathCollection();
|
||||||
|
RimWellPath* wellPath = wellPathCollection->wellPathByName(m_wellName);
|
||||||
|
|
||||||
|
RimWellLogTrack::TrajectoryType trajectoryType;
|
||||||
|
|
||||||
|
if (wellPath)
|
||||||
|
{
|
||||||
|
trajectoryType = RimWellLogTrack::WELL_PATH;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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(rimCase, trajectoryType, wellPath, m_wellName, m_branchIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -174,6 +174,8 @@ private:
|
|||||||
void setPlotXAxisTitles(RimWellLogTrack* plotTrack);
|
void setPlotXAxisTitles(RimWellLogTrack* plotTrack);
|
||||||
std::vector<RimEclipseCase*> eclipseCases() const;
|
std::vector<RimEclipseCase*> eclipseCases() const;
|
||||||
|
|
||||||
|
void updateFormationNamesData() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_showPlotTitle;
|
caf::PdmField<bool> m_showPlotTitle;
|
||||||
caf::PdmField<QString> m_userName;
|
caf::PdmField<QString> m_userName;
|
||||||
|
Loading…
Reference in New Issue
Block a user