X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcontainer.cpp;h=cd50d587381c4a62002d2211cad3c8436e9ecb87;hb=143b369c0308a8cd524cb0ed51c5d67d6be69603;hp=ced7326de4979b91e67d4d16dfe97694101d4837;hpb=e8987f4028a1f9c0eeb33a45bd11b2e409b9c2c5;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; +} +