mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2038 RFT Plot: Set default values for formation names
This commit is contained in:
parent
fc4ceeda95
commit
c8b05fe9ce
@ -81,6 +81,7 @@ public:
|
|||||||
|
|
||||||
void setCurrentWellName(const QString& currWellName);
|
void setCurrentWellName(const QString& currWellName);
|
||||||
QString currentWellName() const;
|
QString currentWellName() const;
|
||||||
|
int branchIndex() const;
|
||||||
|
|
||||||
static bool hasPressureData(const RimWellLogFile* wellLogFile);
|
static bool hasPressureData(const RimWellLogFile* wellLogFile);
|
||||||
static bool isPressureChannel(RimWellLogFileChannel* channel);
|
static bool isPressureChannel(RimWellLogFileChannel* channel);
|
||||||
|
@ -244,6 +244,20 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
}
|
}
|
||||||
else if (changedField == &m_showFormations)
|
else if (changedField == &m_showFormations)
|
||||||
{
|
{
|
||||||
|
if (!m_formationCase)
|
||||||
|
{
|
||||||
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
|
if (proj)
|
||||||
|
{
|
||||||
|
std::vector<RimCase*> cases;
|
||||||
|
proj->allCases(cases);
|
||||||
|
if (!cases.empty())
|
||||||
|
{
|
||||||
|
m_formationCase = cases[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadDataAndUpdate();
|
loadDataAndUpdate();
|
||||||
}
|
}
|
||||||
else if (changedField == &m_formationCase)
|
else if (changedField == &m_formationCase)
|
||||||
@ -455,6 +469,16 @@ void RimWellLogTrack::loadDataAndUpdate()
|
|||||||
m_simulationWellChosen = true;
|
m_simulationWellChosen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RimWellRftPlot* rftPlot(nullptr);
|
||||||
|
firstAncestorOrThisOfType(rftPlot);
|
||||||
|
|
||||||
|
if (rftPlot)
|
||||||
|
{
|
||||||
|
m_trajectoryType = RimWellLogTrack::SIMULATION_WELL;
|
||||||
|
m_simWellName = rftPlot->currentWellName();
|
||||||
|
m_branchIndex = rftPlot->branchIndex();
|
||||||
|
}
|
||||||
|
|
||||||
if (m_showFormations)
|
if (m_showFormations)
|
||||||
{
|
{
|
||||||
m_trajectoryType.uiCapability()->setUiReadOnly(false);
|
m_trajectoryType.uiCapability()->setUiReadOnly(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user