From: mkr Date: Mon, 23 Nov 2015 09:21:49 +0000 (+0300) Subject: refs #735: fix the situation, when edited polyline requires updating without reason... X-Git-Tag: v1.5~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8cb6fa64a1eb38e2675c27fdae919200eccc8cfe;p=modules%2Fhydro.git refs #735: fix the situation, when edited polyline requires updating without reason for it. --- 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()) {