From 6de789f19102efda830e0b3f3e95af04922e4fda Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 1 Oct 2015 08:57:32 +0300 Subject: [PATCH] #636: change of altitude object does not change the object geometry --- src/HYDROData/HYDROData_ImmersibleZone.cxx | 3 +++ src/HYDROData/HYDROData_Object.cxx | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/HYDROData/HYDROData_ImmersibleZone.cxx b/src/HYDROData/HYDROData_ImmersibleZone.cxx index ae2b7ddd..8382e12a 100644 --- a/src/HYDROData/HYDROData_ImmersibleZone.cxx +++ b/src/HYDROData/HYDROData_ImmersibleZone.cxx @@ -261,6 +261,9 @@ QColor HYDROData_ImmersibleZone::getDefaultBorderColor() const void HYDROData_ImmersibleZone::SetPolyline( const Handle(HYDROData_PolylineXY)& thePolyline ) { + if( IsEqual( GetPolyline(), thePolyline ) ) + return; + SetReferenceObject( thePolyline, DataTag_Polyline ); SetToUpdate( true ); } diff --git a/src/HYDROData/HYDROData_Object.cxx b/src/HYDROData/HYDROData_Object.cxx index 25b9e262..13a01102 100644 --- a/src/HYDROData/HYDROData_Object.cxx +++ b/src/HYDROData/HYDROData_Object.cxx @@ -194,8 +194,9 @@ bool HYDROData_Object::SetAltitudeObject( SetReferenceObject( theAltitude, DataTag_AltitudeObject ); - // Indicate model of the need to update object - SetToUpdate( true ); + // #636: In the case of the altitude object change the geometry of the main object is not changed, + // to the object should not be marked as updated + //SetToUpdate( true ); return true; } @@ -214,8 +215,9 @@ void HYDROData_Object::RemoveAltitudeObject() ClearReferenceObjects( DataTag_AltitudeObject ); - // Indicate model of the need to update object - SetToUpdate( true ); + // #636: In the case of the altitude object change the geometry of the main object is not changed, + // to the object should not be marked as updated + //SetToUpdate( true ); } void HYDROData_Object::SetFillingColor( const QColor& theColor ) -- 2.39.2