IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,HYDROData_Entity)
-HYDROData_Object::HYDROData_Object()
-: HYDROData_Entity()
+HYDROData_Object::HYDROData_Object( Geometry theGeometry )
+ : HYDROData_Entity( theGeometry )
{
}
void HYDROData_Object::Update()
{
- removeTopShape();
- removeShape3D();
- removeGroupObjects();
+ if( IsMustBeUpdated( Geom_2d ) )
+ {
+ removeTopShape();
+ removeGroupObjects();
+ }
+ if( IsMustBeUpdated( Geom_3d ) )
+ removeShape3D();
+
checkAndSetAltitudeObject();
HYDROData_Entity::Update();
}
return aResSeq;
}
-void HYDROData_Object::SetToUpdate( bool theFlag )
+void HYDROData_Object::Changed( Geometry theChangedGeometry )
{
- HYDROData_Entity::SetToUpdate( theFlag );
+ HYDROData_Entity::Changed( theChangedGeometry );
Handle(HYDROData_DummyObject3D) anObject3D = GetObject3D();
if ( !anObject3D.IsNull() )
- anObject3D->SetToUpdate( theFlag );
+ anObject3D->Changed( theChangedGeometry );
}
void HYDROData_Object::SetTopShape( const TopoDS_Shape& theShape )
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;
}
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 )