RFT Plot. Clear plot when changing well or branch

This commit is contained in:
Bjørn Erik Jensen 2017-10-12 13:16:37 +02:00
parent d02274a897
commit 5bab568a85

View File

@ -832,9 +832,18 @@ void RimWellRftPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
{ {
setDescription(QString(plotNameFormatString()).arg(m_wellName)); setDescription(QString(plotNameFormatString()).arg(m_wellName));
} }
if (changedField == &m_wellName || changedField == &m_branchIndex)
{
auto plotTrack = m_wellLogPlot->trackByIndex(0);
for (const auto& curve : plotTrack->curvesVector())
{
plotTrack->removeCurve(curve);
}
updateEditorsFromCurves();
}
else if (changedField == &m_selectedSources || else if (changedField == &m_selectedSources ||
changedField == &m_selectedTimeSteps || changedField == &m_selectedTimeSteps)
changedField == &m_branchIndex)
{ {
syncCurvesFromUiSelection(); syncCurvesFromUiSelection();
} }