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 authored and GitHub committed 2022-08-18 14:24:28 +02:00
1 parent a1e7b64d92
commit bea90bc841
1 file changed
+6 -1
@@ -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 );
}
}
//--------------------------------------------------------------------------------------------------