#2227 Well formatins: Clear well path if it does not have well picks

This commit is contained in:
Rebecca Cox
2017-12-12 08:37:56 +01:00
parent 01ae19ebbc
commit 6e4449960f
3 changed files with 37 additions and 4 deletions

View File

@@ -277,6 +277,22 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
pltPlot->updateConnectedEditors();
}
}
bool validWellPathChosen = false;
std::vector<RimWellPath*> wellPaths;
RimTools::wellPathWithFormations(&wellPaths);
for (RimWellPath* wellPath : wellPaths)
{
if (wellPath == m_formationWellPath)
{
validWellPathChosen = true;
break;
}
}
if (!validWellPathChosen)
{
m_formationWellPath = nullptr;
}
}
else if (changedField == &m_formationCase)
{