X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcontainer.cpp;h=9cda1fa38b95e6c10d1af0659326a69af61c5501;hb=4d6ba8a6eb781dbee818b6a55d21df7b52468936;hp=6050f3217b73ecea8f7bb33ef63df8ec77d740d4;hpb=9590e4ed45fd4e05eccc16bd8e9d51596aea5a6d;p=architektonas diff --git a/src/container.cpp b/src/container.cpp index 6050f32..9cda1fa 100644 --- a/src/container.cpp +++ b/src/container.cpp @@ -123,12 +123,13 @@ having to ungroup them first (like Inkscape). /*virtual*/ bool Container::Collided(Vector point) { objectWasDragged = false; -// Vector v1 = position - point; - bool collision = false; + lastObjectClicked = NULL; - // NOTE that this deletes the object on mouse down instead of mouse up. Have to - // check to see how it feels to do it that way... + // NOTE that this deletes the object on mouse down instead of mouse up. + // Have to check to see how it feels to do it that way... + // N.B.: This only works because the toolAction is not set, & + // Object::ignoreClicks isn't set either... if (deleteActive) { for(std::vector::iterator i=objects.begin(); i!=objects.end();) @@ -149,7 +150,11 @@ printf("Container::Collided: Deleting object ($%X)\n", *i); for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) { if ((*i)->Collided(point)) + { collision = true; + lastObjectClicked = *i; +//printf("Container::Collided: lastObjectClicked = %X\n", lastObjectClicked); + } } }