From: sln Date: Fri, 9 Nov 2007 09:28:17 +0000 (+0000) Subject: forgetLocalUserChanges method added X-Git-Tag: CTH_V1_3~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b318785399dcdbc7c2ed78f67e64e966158a49c9;p=modules%2Fgui.git forgetLocalUserChanges method added --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index ba6048eca..dae808b56 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -2395,6 +2395,27 @@ bool Plot2d_ViewFrame::isTitleChangedByUser( const ObjectType type ) } } +/*! + Verifies whether plot title must be generated automatically using curves titles +*/ +void Plot2d_ViewFrame::forgetLocalUserChanges( const ObjectType type ) +{ + switch ( type ) + { + case MainTitle: + myTitleChangedByUser = false; + break; + case XTitle: + myXTitleChangedByUser = false; + break; + case YTitle: + myYTitleChangedByUser = false; + break; + default: + break; + } +} + /*! Sets flag for automatic updates of titles in accordance with current set of curves ( updateTitles method). You should call setAutoUpdateTitle( ObjType, false ) @@ -2408,10 +2429,13 @@ void Plot2d_ViewFrame::setAutoUpdateTitle( const ObjectType type, const bool upd { case MainTitle: myTitleAutoUpdate = upd; + break; case XTitle: myXTitleAutoUpdate = upd; + break; case YTitle: myYTitleAutoUpdate = upd; + break; default: break; } diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index 1c8c2596f..4588e5631 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -101,6 +101,7 @@ public: QString getTitle( ObjectType type ) const; bool isTitleChangedByUser( const ObjectType type ); + void forgetLocalUserChanges( const ObjectType type ); void setFont( const QFont& font, ObjectType type, bool update = true ); void setHorScaleMode( const int mode, bool update = true );