mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2303 Formations: Update well path only when formation source changes
This commit is contained in:
parent
fc2e638ba2
commit
cf12e5ae36
@ -242,7 +242,7 @@ void RimWellRftPlot::updateFormationsOnPlot() const
|
|||||||
|
|
||||||
RimCase* formationNamesCase = m_wellLogPlot->trackByIndex(0)->formationNamesCase();
|
RimCase* formationNamesCase = m_wellLogPlot->trackByIndex(0)->formationNamesCase();
|
||||||
|
|
||||||
if ( !formationNamesCase )
|
if (!formationNamesCase)
|
||||||
{
|
{
|
||||||
/// Set default case. Todo : Use the first of the selected cases in the plot
|
/// Set default case. Todo : Use the first of the selected cases in the plot
|
||||||
std::vector<RimCase*> cases;
|
std::vector<RimCase*> cases;
|
||||||
|
@ -260,15 +260,17 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
}
|
}
|
||||||
else if (changedField == &m_showFormations || changedField == &m_formationSource)
|
else if (changedField == &m_showFormations || changedField == &m_formationSource)
|
||||||
{
|
{
|
||||||
bool validWellPathChosen = false;
|
if (changedField == &m_formationSource && m_formationSource == WELL_PICK_FILTER)
|
||||||
std::vector<RimWellPath*> wellPaths;
|
|
||||||
RimTools::wellPathWithFormations(&wellPaths);
|
|
||||||
for (RimWellPath* wellPath : wellPaths)
|
|
||||||
{
|
{
|
||||||
if (wellPath == m_formationWellPathForSourceCase)
|
std::vector<RimWellPath*> wellPaths;
|
||||||
|
RimTools::wellPathWithFormations(&wellPaths);
|
||||||
|
for (RimWellPath* wellPath : wellPaths)
|
||||||
{
|
{
|
||||||
m_formationWellPathForSourceWellPath = m_formationWellPathForSourceCase();
|
if (wellPath == m_formationWellPathForSourceCase)
|
||||||
break;
|
{
|
||||||
|
m_formationWellPathForSourceWellPath = m_formationWellPathForSourceCase();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,8 +286,8 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
RimWellPltPlot* pltPlot(nullptr);
|
RimWellPltPlot* pltPlot(nullptr);
|
||||||
|
|
||||||
firstAncestorOrThisOfType(pltPlot);
|
firstAncestorOrThisOfType(pltPlot);
|
||||||
|
|
||||||
if (pltPlot)
|
if (pltPlot)
|
||||||
{
|
{
|
||||||
pltPlot->updateConnectedEditors();
|
pltPlot->updateConnectedEditors();
|
||||||
@ -362,7 +364,6 @@ QList<caf::PdmOptionItemInfo> RimWellLogTrack::calculateValueOptions(const caf::
|
|||||||
if (fieldNeedingOptions == &m_formationWellPathForSourceCase)
|
if (fieldNeedingOptions == &m_formationWellPathForSourceCase)
|
||||||
{
|
{
|
||||||
RimTools::wellPathOptionItems(&options);
|
RimTools::wellPathOptionItems(&options);
|
||||||
|
|
||||||
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
options.push_front(caf::PdmOptionItemInfo("None", nullptr));
|
||||||
}
|
}
|
||||||
else if (fieldNeedingOptions == &m_formationWellPathForSourceWellPath)
|
else if (fieldNeedingOptions == &m_formationWellPathForSourceWellPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user