mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8531 QtCharts: Fix performance degradation on ensemble of curves.
The axes signals and slots were connected multiple time leading to a large number of RiuQtChartsPlotWidget::plotZoomed() calls.
This commit is contained in:
parent
654116c573
commit
8253cfae2d
@ -873,11 +873,15 @@ void RiuQtChartsPlotWidget::setAxis( RiuPlotAxis axis, QtCharts::QAbstractSeries
|
||||
|
||||
if ( qobject_cast<QValueAxis*>( newAxis ) || qobject_cast<QLogValueAxis*>( newAxis ) )
|
||||
{
|
||||
connect( newAxis, SIGNAL( rangeChanged( double, double ) ), this, SLOT( axisRangeChanged() ) );
|
||||
connect( newAxis, SIGNAL( rangeChanged( double, double ) ), this, SLOT( axisRangeChanged() ), Qt::UniqueConnection );
|
||||
}
|
||||
else if ( qobject_cast<QDateTimeAxis*>( newAxis ) )
|
||||
{
|
||||
connect( newAxis, SIGNAL( rangeChanged( QDateTime, QDateTime ) ), this, SLOT( axisRangeChanged() ) );
|
||||
connect( newAxis,
|
||||
SIGNAL( rangeChanged( QDateTime, QDateTime ) ),
|
||||
this,
|
||||
SLOT( axisRangeChanged() ),
|
||||
Qt::UniqueConnection );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user