- TopoDS_Shape S;
- CORBA::String_var anIOR = geom->GetStringFromIOR(aShape);
- TCollection_AsciiString IOR = (char*)anIOR.in();
- Standard_Boolean anIndex = Find(IOR, S);
+ CORBA::String_var anIOR = geom->GetStringFromIOR(aShape);
+ TCollection_AsciiString IOR = anIOR.in();
+
+ // Special treatment for groups: group value (shape) is computed on
+ // first demand, and its tick is set to main shape's tick after that;
+ // tick of modified group is decremented.
+ // There is a not fixed problem: if anyone modifies a group and updates
+ // it before call to this method, the group will not be changed in the buffer
+ bool isModifiedSubShape = false;
+ int aShapeTick = aShape->GetTick();
+ if ( !aShape->IsMainShape() ) {
+ int anOldTick = aShapeTick;
+ aShape->GetShapeType(); // compute subshape and update its tick, if not yet
+ aShapeTick = aShape->GetTick();
+ isModifiedSubShape = (anOldTick != aShapeTick);
+ }