Store the List of shape

Hi. I have a Problem to store the shape. My purpose is to make a face to operate cut. first, i make a rectangle using TopoDS_Edge, So In screen, there are 4 segment of line. then I drag, and select the shape(In my case, I use MFC. So i make this code in OnMouseMove)

CobjectView::OnMouseMove(UINT nFlags, CPoint point)
{
if(nFlags & MK_LBUTTON)
{
if(nFlags & MK_SHIFT)
{
GetDocument()->myAISContext->ShiftSelect(FirstClickPoint.x , FirstClickPoint.y, point.x ,point.y ,myView);

GetDocument()->myAISContext->InitSelected();
}
else
{
AIS_StatusOfPick StatusOfPick = GetDocument()->myAISContext->Select(FirstClickPoint.x , FirstClickPoint.y, point.x ,point.y ,myView);

GetDocument()->myAISContext->InitSelected();

if(StatusOfPick != AIS_SOP_Error && StatusOfPick != AIS_SOP_NothingSelected)
{
SequenceOfShape->Append(GetDocument()->myAISContext->SelectedShape());
}
}
}

SequenceOfShape is object of Handle(TopTools_HSequenceOfShape) and it generates in CobjectView Class like

Handle(TopTools_HSequenceOfShape) = new TopTools_HSequenceOfShape;

Of course, There is no error. But I check the length of SequenceOfShape, Length is not 4. It is effected by Scroll speed.(It's funny :-( ....); If i move the mouse fast, sometimes length is 4 or 5 etc, but not, 20 or 45....

why does it happen?

shudolf's picture

I forget to say that I don't openlocalcontext

sorry.