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 GitHub
parent a1e7b64d92
commit bea90bc841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 );
}
}
//--------------------------------------------------------------------------------------------------