mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8522 Summary Plot: handle plot axis deletion.
This commit is contained in:
@@ -2457,3 +2457,33 @@ void RimSummaryPlot::assignPlotAxis( RimSummaryCurve* curve )
|
||||
|
||||
curve->setLeftOrRightAxisY( newPlotAxis );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
if ( childArray == &m_axisProperties )
|
||||
{
|
||||
for ( caf::PdmObjectHandle* reffingObj : referringObjects )
|
||||
{
|
||||
RimSummaryCurve* curve = dynamic_cast<RimSummaryCurve*>( reffingObj );
|
||||
RimEnsembleCurveSet* curveSet = dynamic_cast<RimEnsembleCurveSet*>( reffingObj );
|
||||
if ( curve )
|
||||
{
|
||||
curve->setLeftOrRightAxisY( RiuPlotAxis::defaultLeft() );
|
||||
}
|
||||
else if ( curveSet )
|
||||
{
|
||||
curveSet->setAxisY( RiuPlotAxis::defaultLeft() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( plotWidget() )
|
||||
{
|
||||
updateAxes();
|
||||
plotWidget()->scheduleReplot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user