]> Shamusworld >> Repos - architektonas/blobdiff - src/dimension.cpp
Fixed loading code, added "Base Unit" dialog.
[architektonas] / src / dimension.cpp
index 6f561be7da4896efd7b5226277bde827bd3c91f8..2a989dccec0de1b91fb3d68f8ab13e4d2ebbbcdf 100644 (file)
@@ -324,6 +324,25 @@ about keeping track of old states...
 }
 
 
+/*virtual*/ Object * Dimension::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.
+*/
+
+       Dimension * d = new Dimension(position, endpoint, dimensionType, parent);
+       d->size = size;
+       return d;
+}
+
+
 // Dimensions are special: they contain exactly *two* points. Here, we check
 // only for zero/non-zero in returning the correct points.
 /*virtual*/ Vector Dimension::GetPointAtParameter(double parameter)