mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make sure summary case is set before assigning curve axis
This commit is contained in:
parent
7d8b947a71
commit
9d21faf38c
@ -705,7 +705,7 @@ void RicSummaryPlotEditorUi::updateTargetPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSummaryPlotEditorUi::copyCurveAndAddToPlot( const RimSummaryCurve* curve, RimSummaryPlot* plot, bool forceVisible )
|
||||
{
|
||||
RimSummaryCurve* curveCopy =
|
||||
auto curveCopy =
|
||||
dynamic_cast<RimSummaryCurve*>( curve->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
CVF_ASSERT( curveCopy );
|
||||
|
||||
@ -714,11 +714,11 @@ void RicSummaryPlotEditorUi::copyCurveAndAddToPlot( const RimSummaryCurve* curve
|
||||
curveCopy->setCheckState( true );
|
||||
}
|
||||
|
||||
plot->addCurveNoUpdate( curveCopy, false );
|
||||
curveCopy->setLeftOrRightAxisY( curve->axisY() );
|
||||
|
||||
// The curve creator is not a descendant of the project, and need to be set manually
|
||||
curveCopy->setSummaryCaseY( curve->summaryCaseY() );
|
||||
|
||||
bool autoAssignAxis = true;
|
||||
plot->addCurveNoUpdate( curveCopy, autoAssignAxis );
|
||||
|
||||
curveCopy->initAfterReadRecursively();
|
||||
curveCopy->loadDataAndUpdate( false );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user