From 8cb6fa64a1eb38e2675c27fdae919200eccc8cfe Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 23 Nov 2015 12:21:49 +0300 Subject: [PATCH] refs #735: fix the situation, when edited polyline requires updating without reason for it. --- src/HYDROData/HYDROData_PolylineXY.cxx | 10 ++++++++++ src/HYDROData/HYDROData_PolylineXY.h | 2 ++ src/HYDROGUI/HYDROGUI_PolylineOp.cxx | 3 +++ 3 files changed, 15 insertions(+) diff --git a/src/HYDROData/HYDROData_PolylineXY.cxx b/src/HYDROData/HYDROData_PolylineXY.cxx index ea4eaf09..24728efa 100644 --- a/src/HYDROData/HYDROData_PolylineXY.cxx +++ b/src/HYDROData/HYDROData_PolylineXY.cxx @@ -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 ); diff --git a/src/HYDROData/HYDROData_PolylineXY.h b/src/HYDROData/HYDROData_PolylineXY.h index e9181876..e052a1c3 100644 --- a/src/HYDROData/HYDROData_PolylineXY.h +++ b/src/HYDROData/HYDROData_PolylineXY.h @@ -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: diff --git a/src/HYDROGUI/HYDROGUI_PolylineOp.cxx b/src/HYDROGUI/HYDROGUI_PolylineOp.cxx index 9666cf7a..da94fccf 100755 --- a/src/HYDROGUI/HYDROGUI_PolylineOp.cxx +++ b/src/HYDROGUI/HYDROGUI_PolylineOp.cxx @@ -153,7 +153,10 @@ void HYDROGUI_PolylineOp::startOperation() NCollection_Sequence aSectNames; NCollection_Sequence aSectTypes; NCollection_Sequence aSectClosures; + bool aIsInCustom = myEditedObject->GetIsInCustomFlag(); + myEditedObject->SetIsInCustomFlag( true ); myEditedObject->GetSections( aSectNames, aSectTypes, aSectClosures ); + myEditedObject->SetIsInCustomFlag( aIsInCustom ); if (!aSectNames.IsEmpty()) { -- 2.39.2