mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
parent
a7b6f0ea9d
commit
4755fdb504
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
void applyCurveAutoNameSettings(const RimSummaryCurveAutoName& autoNameSettings);
|
||||
|
||||
virtual QString curveExportDescription() const override;
|
||||
void forceUpdateCurveAppearanceFromCaseType();
|
||||
|
||||
protected:
|
||||
// RimPlotCurve overrides
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user