Merge pull request #8765 from OPM/summarymultiplot_performance2

Summary Multiplot performance improvements and fixes
This commit is contained in:
jonjenssen
2022-04-01 19:23:27 +02:00
committed by GitHub
parent 46a8bd58b2
commit 22d6e3f853
19 changed files with 175 additions and 70 deletions

View File

@@ -190,10 +190,9 @@ void RimMultiPlot::insertPlot( RimPlot* plot, size_t index )
if ( m_viewer )
{
plot->createPlotWidget();
plot->createPlotWidget( m_viewer );
m_viewer->insertPlot( plot->plotWidget(), index );
}
plot->setShowWindow( true );
plot->updateAfterInsertingIntoMultiPlot();
onPlotAdditionOrRemoval();
@@ -217,6 +216,29 @@ void RimMultiPlot::removePlot( RimPlot* plot )
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimMultiPlot::removePlotNoUpdate( RimPlot* plot )
{
if ( plot )
{
if ( m_viewer )
{
m_viewer->removePlotNoUpdate( plot->plotWidget() );
}
m_plots.removeChildObject( plot );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimMultiPlot::updateAfterPlotRemove()
{
onPlotAdditionOrRemoval();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -851,7 +873,7 @@ void RimMultiPlot::recreatePlotWidgets()
for ( size_t tIdx = 0; tIdx < plotVector.size(); ++tIdx )
{
plotVector[tIdx]->createPlotWidget();
plotVector[tIdx]->createPlotWidget( m_viewer );
m_viewer->addPlot( plotVector[tIdx]->plotWidget() );
}
}