From: mgn Date: Thu, 9 Apr 2015 14:29:25 +0000 (+0300) Subject: 0002774: External 20697 Plot2D Stop X-Git-Tag: CTH_2_1_a~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fe89c2d5362ac6dd1824c2d0fdfdb0a375f83441;p=modules%2Fgui.git 0002774: External 20697 Plot2D Stop Additional fix --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index dbe6b99d5..e21dc8a65 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -649,11 +649,9 @@ void Plot2d_ViewFrame::displayCurve( Plot2d_Curve* curve, bool update ) aPCurve->setSymbolsColorMap( curve->getColorMap() ); } + updateTitles( update ); if ( update ) - { - updateTitles(); myPlot->replot(); - } emit curveDisplayed( curve ); } @@ -689,7 +687,7 @@ void Plot2d_ViewFrame::eraseCurve( Plot2d_Curve* curve, bool update ) aPCurve->hide(); aPCurve->detach(); myPlot->getCurves().remove( aPCurve ); - updateTitles(); + updateTitles( update ); if ( update ) myPlot->replot(); emit curveErased( curve ); @@ -2469,7 +2467,7 @@ void Plot2d_ViewFrame::copyPreferences( Plot2d_ViewFrame* vf ) Updates titles according to curves */ #define BRACKETIZE(x) QString( "[ " ) + x + QString( " ]" ) -void Plot2d_ViewFrame::updateTitles() +void Plot2d_ViewFrame::updateTitles( bool update ) { CurveDict::Iterator it = myPlot->getCurves().begin(); //QIntDictIterator it( myCurves ); @@ -2520,19 +2518,19 @@ void Plot2d_ViewFrame::updateTitles() yTitle += " "; if ( getAutoUpdateTitle( XTitle ) ) - setTitle( myXTitleEnabled, xTitle + xUnits, XTitle, true ); + setTitle( myXTitleEnabled, xTitle + xUnits, XTitle, update ); else - setTitle( myXTitleEnabled, myXTitle, XTitle, true ); + setTitle( myXTitleEnabled, myXTitle, XTitle, update ); if ( getAutoUpdateTitle( YTitle ) ) - setTitle( myYTitleEnabled, yTitle + yUnits, YTitle, true ); + setTitle( myYTitleEnabled, yTitle + yUnits, YTitle, update ); else - setTitle( myYTitleEnabled, myYTitle, YTitle, true ); + setTitle( myYTitleEnabled, myYTitle, YTitle, update ); if ( getAutoUpdateTitle( MainTitle ) ) - setTitle( true, aTables.join("; "), MainTitle, true ); + setTitle( true, aTables.join("; "), MainTitle, update ); else - setTitle( true, myTitle, MainTitle, true ); + setTitle( true, myTitle, MainTitle, update ); } /*! diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index 0502caa1b..a276e2196 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -66,7 +66,7 @@ public: virtual bool eventFilter(QObject* watched, QEvent* e); /* operations */ - void updateTitles(); + void updateTitles( bool update = true ); void setTitle( const QString& title ); QString getTitle() const { return myTitle; } void displayCurve( Plot2d_Curve* curve, bool update = false );