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 Magne Sjaastad committed 2022-09-15 08:19:41 +02:00
1 parent 30921a158b
commit 3315a369dd
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 );
}
}
//--------------------------------------------------------------------------------------------------