mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8715 Fix multi summary title and legend updates
This commit is contained in:
@@ -101,6 +101,9 @@ void RimSummaryMultiPlot::addPlot( RimPlot* plot )
|
||||
CVF_ASSERT( sumPlot != nullptr );
|
||||
if ( sumPlot )
|
||||
{
|
||||
// Not required to connect signal here, as RimSummaryMultiPlot::insertPlot() will always be called from
|
||||
// RimMultiPlot::addPlot()
|
||||
|
||||
RimMultiPlot::addPlot( plot );
|
||||
}
|
||||
}
|
||||
@@ -114,6 +117,7 @@ void RimSummaryMultiPlot::insertPlot( RimPlot* plot, size_t index )
|
||||
CVF_ASSERT( sumPlot != nullptr );
|
||||
if ( sumPlot )
|
||||
{
|
||||
sumPlot->curvesChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged );
|
||||
RimMultiPlot::insertPlot( plot, index );
|
||||
}
|
||||
}
|
||||
@@ -131,9 +135,9 @@ void RimSummaryMultiPlot::addPlot( const std::vector<caf::PdmObjectHandle*>& obj
|
||||
RimSummaryPlot* plot = new RimSummaryPlot();
|
||||
plot->enableAutoPlotTitle( true );
|
||||
|
||||
addPlot( plot );
|
||||
|
||||
plot->handleDroppedObjects( objects );
|
||||
|
||||
addPlot( plot );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,6 +512,19 @@ bool RimSummaryMultiPlot::handleGlobalWheelEvent( QWheelEvent* wheelEvent )
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::initAfterRead()
|
||||
{
|
||||
RimMultiPlot::initAfterRead();
|
||||
|
||||
for ( auto plot : summaryPlots() )
|
||||
{
|
||||
plot->curvesChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -560,3 +577,12 @@ void RimSummaryMultiPlot::duplicate()
|
||||
{
|
||||
duplicatePlot.send( this );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::onSubPlotChanged( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
updatePlotWindowTitle();
|
||||
applyPlotWindowTitleToWidgets();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user