Salome HOME
refs #735: fix the situation, when edited polyline requires updating without reason...
authormkr <mkr@opencascade.com>
Mon, 23 Nov 2015 09:21:49 +0000 (12:21 +0300)
committermkr <mkr@opencascade.com>
Mon, 23 Nov 2015 09:21:49 +0000 (12:21 +0300)
src/HYDROData/HYDROData_PolylineXY.cxx
src/HYDROData/HYDROData_PolylineXY.h
src/HYDROGUI/HYDROGUI_PolylineOp.cxx

index ea4eaf09f91f4959bbffc31f3c6b3e88f0995aa7..24728efa04d51d255bbd0ce74ae49feb9a8c2085 100644 (file)
@@ -1202,6 +1202,16 @@ bool HYDROData_PolylineXY::IsCustom() const
   return !isNull && aNbPoints == 0;
 }
 
+bool HYDROData_PolylineXY::GetIsInCustomFlag() const
+{
+  return myIsInCustomFlag;
+}
+
+void HYDROData_PolylineXY::SetIsInCustomFlag( bool theValue )
+{
+  myIsInCustomFlag = theValue;
+}
+
 void HYDROData_PolylineXY::Interpolate()
 {
   ImportShape( GetShape(), true );
index e9181876b885f1421da0765e5d64cb7c866d6dd5..e052a1c3aac0af7c39db43bff214673031e70ab0 100644 (file)
@@ -85,6 +85,8 @@ public:
   HYDRODATA_EXPORT static QColor DefaultWireColor();
 
   HYDRODATA_EXPORT bool IsCustom() const;
+  HYDRODATA_EXPORT bool GetIsInCustomFlag() const;
+  HYDRODATA_EXPORT void SetIsInCustomFlag( bool theValue );
 
 public:
 
index 9666cf7afc5e9c300cba9c3c5b71c7b87995d748..da94fccf784b8a0d0807626a8d326dd573904f61 100755 (executable)
@@ -153,7 +153,10 @@ void HYDROGUI_PolylineOp::startOperation()
     NCollection_Sequence<TCollection_AsciiString>           aSectNames;
     NCollection_Sequence<HYDROData_PolylineXY::SectionType> aSectTypes;
     NCollection_Sequence<bool>                              aSectClosures;
+    bool aIsInCustom = myEditedObject->GetIsInCustomFlag();
+    myEditedObject->SetIsInCustomFlag( true );
     myEditedObject->GetSections( aSectNames, aSectTypes, aSectClosures );
+    myEditedObject->SetIsInCustomFlag( aIsInCustom );
 
     if (!aSectNames.IsEmpty())
     {