#3171 Plot source stepping. Force update curve appearace when stepping from a grid case to an observed case, and vice versa

This commit is contained in:
Bjørn Erik Jensen 2018-07-09 13:58:01 +02:00
parent a7b6f0ea9d
commit 4755fdb504
4 changed files with 28 additions and 6 deletions

View File

@ -677,6 +677,30 @@ QString RimSummaryCurve::curveExportDescription() const
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCurve::forceUpdateCurveAppearanceFromCaseType()
{
if (m_yValuesSummaryCase)
{
if (m_yValuesSummaryCase->isObservedData())
{
setLineStyle(RimPlotCurve::STYLE_NONE);
if (symbol() == RimPlotCurve::SYMBOL_NONE)
{
setSymbol(RimPlotCurve::SYMBOL_XCROSS);
}
}
else
{
setLineStyle(RimPlotCurve::STYLE_SOLID);
setSymbol(RimPlotCurve::SYMBOL_NONE);
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -75,6 +75,7 @@ public:
void applyCurveAutoNameSettings(const RimSummaryCurveAutoName& autoNameSettings);
virtual QString curveExportDescription() const override;
void forceUpdateCurveAppearanceFromCaseType();
protected:
// RimPlotCurve overrides

View File

@ -355,12 +355,7 @@ void RimSummaryCurveAppearanceCalculator::setupCurveLook(RimSummaryCurve* curve)
if ( curve->summaryCaseY()->isObservedData() )
{
curve->setLineStyle(RimPlotCurve::STYLE_NONE);
if ( curve->symbol() == RimPlotCurve::SYMBOL_NONE )
{
curve->setSymbol(RimPlotCurve::SYMBOL_XCROSS);
}
curve->forceUpdateCurveAppearanceFromCaseType();
}
}

View File

@ -305,7 +305,9 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi(const caf::PdmFieldHandle* c
{
if (isYAxisStepping())
{
bool doSetAppearance = curve->summaryCaseY()->isObservedData() != m_summaryCase->isObservedData();
curve->setSummaryCaseY(m_summaryCase);
if (doSetAppearance) curve->forceUpdateCurveAppearanceFromCaseType();
}
if (isXAxisStepping())