Make sure errorbars use the same axis as the data curve (#9212)

* Make sure errorbars use the same axis as the data curve
This commit is contained in:
jonjenssen 2022-08-18 14:24:28 +02:00 committed by Magne Sjaastad
parent 30921a158b
commit 3315a369dd

View File

@ -500,7 +500,12 @@ void RiuQwtPlotCurve::setXAxis( RiuPlotAxis axis )
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotCurve::setYAxis( RiuPlotAxis axis )
{
if ( m_plotWidget ) QwtPlotCurve::setYAxis( m_plotWidget->toQwtPlotAxis( axis ) );
if ( m_plotWidget )
{
auto axisId = m_plotWidget->toQwtPlotAxis( axis );
QwtPlotCurve::setYAxis( axisId );
if ( m_qwtCurveErrorBars ) m_qwtCurveErrorBars->setYAxis( axisId );
}
}
//--------------------------------------------------------------------------------------------------