From 1bbabb6a4145a459a6655a3bc18b71ec135bf814 Mon Sep 17 00:00:00 2001 From: adv Date: Wed, 27 Nov 2013 11:25:57 +0000 Subject: [PATCH] Invalidate method added. --- src/HYDROData/HYDROData_Profile.cxx | 11 +++++++++++ src/HYDROData/HYDROData_Profile.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/HYDROData/HYDROData_Profile.cxx b/src/HYDROData/HYDROData_Profile.cxx index 2c4088c0..257dc01e 100755 --- a/src/HYDROData/HYDROData_Profile.cxx +++ b/src/HYDROData/HYDROData_Profile.cxx @@ -175,6 +175,17 @@ bool HYDROData_Profile::GetLastPoint( gp_XY& thePoint ) const return true; } +void HYDROData_Profile::Invalidate() +{ + TDF_Label aFirstLabel = myLab.FindChild( DataTag_FirstPoint, false ); + if ( !aFirstLabel.IsNull() ) + aFirstLabel.ForgetAllAttributes(); + + TDF_Label aLastLabel = myLab.FindChild( DataTag_LastPoint, false ); + if ( !aLastLabel.IsNull() ) + aLastLabel.ForgetAllAttributes(); +} + Handle(HYDROData_ProfileUZ) HYDROData_Profile::GetProfileUZ( const bool theIsCreate ) const { Handle(HYDROData_ProfileUZ) aProfileUZ; diff --git a/src/HYDROData/HYDROData_Profile.h b/src/HYDROData/HYDROData_Profile.h index e31e6fd4..08383187 100644 --- a/src/HYDROData/HYDROData_Profile.h +++ b/src/HYDROData/HYDROData_Profile.h @@ -74,6 +74,11 @@ public: */ HYDRODATA_EXPORT bool IsValid() const; + /** + * Invalidate profile first and last points. + */ + HYDRODATA_EXPORT void Invalidate(); + public: // Public methods to work with profile points. -- 2.39.2