From 16900d56c9956d484850e63554fd7f2e408e55de Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 14 Sep 2024 15:45:20 +0200 Subject: [PATCH] #11696 Make sure PC axis is visible when required --- .../UserInterface/RiuRelativePermeabilityPlotPanel.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp index 0b8e5b6c2db..1a167a52012 100644 --- a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp +++ b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp @@ -403,7 +403,9 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS if ( plotOnWhichYAxis == RIGHT_YAXIS ) { - qwtCurve->setYAxis( RiuPlotAxis::defaultRight() ); + QwtAxisId relatedYAxis( QwtAxis::YRight, 0 ); + + qwtCurve->QwtPlotCurve::setYAxis( relatedYAxis ); shouldEnableRightYAxis = true; } @@ -432,9 +434,15 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS } if ( shouldEnableRightYAxis ) + { plot->setAxesCount( QwtAxis::YRight, 1 ); + plot->setAxisVisible( QwtAxis::YRight, true ); + } else + { plot->setAxesCount( QwtAxis::YRight, 0 ); + plot->setAxisVisible( QwtAxis::YRight, false ); + } addTransparentCurve( plot, points, axes, logScaleLeftAxis );