mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #8765 from OPM/summarymultiplot_performance2
Summary Multiplot performance improvements and fixes
This commit is contained in:
@@ -52,7 +52,6 @@ CAF_PDM_SOURCE_INIT( RimSummaryMultiPlot, "MultiSummaryPlot" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryMultiPlot::RimSummaryMultiPlot()
|
||||
: duplicatePlot( this )
|
||||
, refreshTree( this )
|
||||
{
|
||||
CAF_PDM_InitObject( "Multi Summary Plot" );
|
||||
this->setDeletable( true );
|
||||
@@ -117,7 +116,6 @@ void RimSummaryMultiPlot::insertPlot( RimPlot* plot, size_t index )
|
||||
{
|
||||
sumPlot->curvesChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged );
|
||||
RimMultiPlot::insertPlot( plot, index );
|
||||
signalRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,10 +148,30 @@ void RimSummaryMultiPlot::removePlot( RimPlot* plot )
|
||||
if ( sumPlot )
|
||||
{
|
||||
RimMultiPlot::removePlot( plot );
|
||||
signalRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::removePlotNoUpdate( RimPlot* plot )
|
||||
{
|
||||
RimSummaryPlot* sumPlot = dynamic_cast<RimSummaryPlot*>( plot );
|
||||
CVF_ASSERT( sumPlot != nullptr );
|
||||
if ( sumPlot )
|
||||
{
|
||||
RimMultiPlot::removePlotNoUpdate( plot );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::updateAfterPlotRemove()
|
||||
{
|
||||
onPlotAdditionOrRemoval();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -387,6 +405,21 @@ std::vector<RimSummaryPlot*> RimSummaryMultiPlot::summaryPlots() const
|
||||
return typedPlots;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSummaryPlot*> RimSummaryMultiPlot::visibleSummaryPlots() const
|
||||
{
|
||||
std::vector<RimSummaryPlot*> visiblePlots;
|
||||
|
||||
for ( auto plot : summaryPlots() )
|
||||
{
|
||||
if ( plot->showWindow() ) visiblePlots.push_back( plot );
|
||||
}
|
||||
|
||||
return visiblePlots;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -535,14 +568,6 @@ void RimSummaryMultiPlot::duplicate()
|
||||
duplicatePlot.send( this );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::signalRefresh()
|
||||
{
|
||||
refreshTree.send( this );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user