void
TCanvasSelectionInteractor::EndInteraction ()
{
if ( fRectSelecting ) {
bool shifted = GetModifierKeys().IsShiftKeyDown();
if ( !shifted ) fSelection->DeselectAllGraphics ();
TCanvasFrontToBackFilter filter;
TGRect bounds (GetFirstPoint(), GetLastPoint());
bounds.OrderPoints ();
TCanvasRectSelectionFunnel funnel (bounds, *fSelection, shifted);
fCanvasView->EnumerateGraphics (filter, funnel);
fCanvasView->AdoptCurrentSelection (::CopyPointer(fSelection));
}
else {
unsigned long n = GetNumberOfPoints ();
if ( n >= 2 ) {
fCommand->SetOffset (GetPoint(n-1)-GetPoint(n-2));
DoIncrement (*(fBinding.GetObject()));
}
AdoptAndDoEnd (fBinding.OrphanObject());
fBinding = NIL;
}
}