]> Shamusworld >> Repos - architektonas/blobdiff - src/container.cpp
Trim tool now works for Lines, but inaccurate.
[architektonas] / src / container.cpp
index 9cda1fa38b95e6c10d1af0659326a69af61c5501..2eca9f4573473c0c772a4efd96060836e6bc15ec 100644 (file)
@@ -201,9 +201,10 @@ class so that we can leverage that stuff here as well.
 // into parts and keep subdividing until an acceptable number of objects lie within
 // the slice. This way, the GUI will still be responsive and *not* have to test
 // every object for collision.
-/*virtual*/ void Container::PointerMoved(Vector point)
+/*virtual*/ bool Container::PointerMoved(Vector point)
 {
        std::vector<Object *>::iterator i;
+       lastObjectHovered = NULL;
 
        if (!isTopLevelContainer)
        {
@@ -215,7 +216,7 @@ class so that we can leverage that stuff here as well.
                        else
                                state = OSInactive;
 
-                       return;
+                       return false;
                }
 
                // No need to do any checking if we're already selected...
@@ -253,17 +254,19 @@ class so that we can leverage that stuff here as well.
                        needUpdate = true;
                }
 
-               return;
+               return false;
        }
 
        for(std::vector<Object *>::iterator i=objects.begin(); i!=objects.end(); i++)
        {
 //             if (objects[i]->GetState() == OSSelected)
-               (*i)->PointerMoved(point);
+               if ((*i)->PointerMoved(point))
+                       lastObjectHovered = *i;
        }
 
        // Generic container doesn't need this???
 //     needUpdate = false;
+       return (lastObjectHovered == NULL ? false : true);
 }