diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp index 2206a06eeb..a475b575c0 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp @@ -200,6 +200,11 @@ RifEclipseSummaryAddress RimSummaryCurve::summaryAddressY() const //-------------------------------------------------------------------------------------------------- void RimSummaryCurve::setSummaryAddressY(const RifEclipseSummaryAddress& address) { + if (m_yValuesCurveVariable->address() != address) + { + m_qwtPlotCurve->clearErrorBars(); + } + m_yValuesCurveVariable->setAddress(address); m_yValuesSummaryFilter->updateFromAddress(address); diff --git a/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.cpp b/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.cpp index 1c142b9986..9ffefa3aee 100644 --- a/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.cpp +++ b/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.cpp @@ -286,6 +286,14 @@ void RiuLineSegmentQwtPlotCurve::detach() m_attachedToPlot = nullptr; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuLineSegmentQwtPlotCurve::clearErrorBars() +{ + m_errorBars->setSamples(nullptr); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.h b/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.h index 3cb2c9fa8c..7fe3847316 100644 --- a/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.h +++ b/ApplicationCode/UserInterface/RiuLineSegmentQwtPlotCurve.h @@ -79,6 +79,7 @@ public: void attach(QwtPlot *plot); void detach(); + void clearErrorBars(); void showErrorBars(bool show); void setErrorBarsColor(QColor color);