From 564994c073f3c54b0e694a6f6cecbab485e96941 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 10 Oct 2014 12:04:42 +0400 Subject: [PATCH] 0002328: Preference for the Plot2d right Y axis --- src/Plot2d/Plot2d_ViewFrame.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 0eeebf1bf..c97d1770a 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -293,7 +293,7 @@ void Plot2d_ViewFrame::Display( const Plot2d_Prs* prs ) */ void Plot2d_ViewFrame::setSecondY( const bool& theSecondY ) { - myPlot->enableAxis(QwtPlot::yRight, theSecondY); + myPlot->enableAxis(QwtPlot::yRight, theSecondY ); mySecondY = theSecondY; } @@ -640,8 +640,7 @@ void Plot2d_ViewFrame::displayCurve( Plot2d_Curve* curve, bool update ) } setCurveType( aPCurve, myCurveType ); aPCurve->setData( curve->horData(), curve->verData(), curve->nbPoints() ); - if ( mySecondY ) - aPCurve->setYAxis( QwtPlot::yRight ); + aPCurve->setYAxis( curve->getYAxis() ); } updateTitles(); if ( update ) @@ -731,7 +730,7 @@ void Plot2d_ViewFrame::updateCurve( Plot2d_Curve* curve, bool update ) } aPCurve->setTitle( curve->getVerTitle() ); aPCurve->setVisible( true ); - aPCurve->setYAxis( mySecondY ? QwtPlot::yRight : QwtPlot::yLeft ); + aPCurve->setYAxis( curve->getYAxis() ); if ( update ) myPlot->replot(); } -- 2.39.2