+ std::vector<Object *>::iterator i;
+
+ if (!isTopLevelContainer)
+ {
+ // check for selection rectangle too
+ if (selectionInProgress)
+ {
+ if (selection.contains(Extents()))
+ state = OSSelected;
+ else
+ state = OSInactive;
+
+ return;
+ }
+
+ // No need to do any checking if we're already selected...
+// if (state == OSSelected)
+// return;
+
+// oldState = state;
+// needUpdate = true;
+// if (dragging &&
+ bool oldHit = hit;
+ hit = false;
+
+ for(i=objects.begin(); i!=objects.end(); i++)
+ {
+ if ((*i)->HitTest(point))
+ {
+// state = OSSelected;
+// return;
+ hit = true;
+ break;
+ }
+ }
+
+ needUpdate = (oldHit != hit ? true : false);
+// state = oldState;
+
+ if (dragging)
+ {
+ Vector delta = point - oldPoint;
+
+ for(i=objects.begin(); i!=objects.end(); i++)
+ (*i)->Translate(delta);
+
+ oldPoint = point;
+ needUpdate = true;
+ }
+
+ return;
+ }