From: imn Date: Mon, 13 Apr 2015 08:10:01 +0000 (+0300) Subject: INT PAL 0052656: Plot2D Viewer: add possibility to change curve type of analytical... X-Git-Tag: V7_6_0b1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd1739213eac9b954d69192c3c2067413efccc85;p=modules%2Fgui.git INT PAL 0052656: Plot2D Viewer: add possibility to change curve type of analytical curves --- diff --git a/src/Plot2d/Plot2d_AnalyticalCurve.h b/src/Plot2d/Plot2d_AnalyticalCurve.h index bb74280cb..8d7d0e56a 100755 --- a/src/Plot2d/Plot2d_AnalyticalCurve.h +++ b/src/Plot2d/Plot2d_AnalyticalCurve.h @@ -30,6 +30,7 @@ class QwtPlot; class QwtPlotItem; +class QwtPlotCurve; class PLOT2D_EXPORT Plot2d_AnalyticalCurve @@ -131,7 +132,7 @@ protected: QString myName; int myAction; int myState; - QwtPlotItem* myCurve; + QwtPlotCurve* myCurve; bool myActive; bool myIsSelected; diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 032627fec..db3e2acc5 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -1988,6 +1988,13 @@ void Plot2d_ViewFrame::setCurveType( int curveType, bool update ) if ( crv ) setCurveType( crv, myCurveType ); } + for(int i=0 ; i < myAnalyticalCurves.count(); i++) { + QwtPlotCurve* aPCurve = dynamic_cast( myAnalyticalCurves[i]->plotItem() ); + Plot2d_AnalyticalCurve* aCurve = dynamic_cast( myAnalyticalCurves[i] ); + if ( aPCurve && aCurve ) { + setCurveType( aPCurve, myCurveType ); + } + } if ( update ) myPlot->replot(); emit vpCurveChanged();