]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Invalidate method added.
authoradv <adv@opencascade.com>
Wed, 27 Nov 2013 11:25:57 +0000 (11:25 +0000)
committeradv <adv@opencascade.com>
Wed, 27 Nov 2013 11:25:57 +0000 (11:25 +0000)
src/HYDROData/HYDROData_Profile.cxx
src/HYDROData/HYDROData_Profile.h

index 2c4088c0f0a5f0e04d6f96838165cdeb45733d6c..257dc01eb6387cc9427bc49e26ee2c95797749e7 100755 (executable)
@@ -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;
index e31e6fd4ac9144b2860b844113a7c6fd4d865ff2..083831878dbbe7b915c724b522e768acfabb270a 100644 (file)
@@ -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.