X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcontainer.cpp;h=cd50d587381c4a62002d2211cad3c8436e9ecb87;hb=669a05b5a52bd759f0ea08772e0ed17222b015a0;hp=ced7326de4979b91e67d4d16dfe97694101d4837;hpb=89b8b0c60579d8ef0cf9a13521e7bf7c7864883f;p=architektonas diff --git a/src/container.cpp b/src/container.cpp index ced7326..cd50d58 100644 --- a/src/container.cpp +++ b/src/container.cpp @@ -162,6 +162,9 @@ printf("Container::Collided: Deleting object ($%X)\n", *i); } } + if (snapToGrid) + point = SnapPointToGrid(point); + // We check to see if the container we're trying to access is the // DrawingView's document. If so, we ignore the state of the container. // Otherwise, we care about the state of the container. :-) @@ -499,3 +502,21 @@ void Container::ResizeAllDimensions(double newSize) fprintf(file, "ENDCONTAINER\n"); } + +/*virtual*/ Object * Container::Copy(void) +{ +#warning "!!! This doesn't take care of attached Dimensions !!!" +/* +This is a real problem. While having a pointer in the Dimension to this line's points +is fast & easy, it creates a huge problem when trying to replicate an object like this. + +Maybe a way to fix that then, is to have reference numbers instead of pointers. That +way, if you copy them, ... you might still have problems. Because you can't be sure if +a copy will be persistant or not, you then *definitely* do not want them to have the +same reference number. +*/ + Container * c = new Container(position, parent); + *c = *this; + return c; +} +