X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fline.cpp;h=8fc9b9c83f3e764940dc07dece9a67457f73a3cb;hb=565c33c91ea355528145ba94b31b2e44309d0834;hp=060868562a8299c3d335bb849f3657d4a0d7417c;hpb=2549a213bacfb2f6993ec143083d72b716854345;p=architektonas diff --git a/src/line.cpp b/src/line.cpp index 0608685..8fc9b9c 100644 --- a/src/line.cpp +++ b/src/line.cpp @@ -52,6 +52,16 @@ Line::~Line() // connect to this dimension object at this point, instead of just becoming // detached. #endif +//actually not true, we know the object pointer and parameter! +//actuall, the Object base class does this for us...! +#if 0 + std::vector::iterator i; + + for(i=connected.begin(); i!=connected.end(); i++) + { + (*i).object->Disconnect(this, (*i).t); + } +#endif } @@ -306,14 +316,8 @@ a dimension only) Draw() function... :-/ if (selectionInProgress) { // Check for whether or not the rect contains this line -#if 0 - if (selection.normalized().contains(Extents())) -#else -// if (selection.normalized().contains(position.x, position.y) -// && selection.normalized().contains(endpoint.x, endpoint.y)) if (selection.contains(position.x, position.y) && selection.contains(endpoint.x, endpoint.y)) -#endif state = OSSelected; else state = OSInactive; @@ -353,6 +357,8 @@ a dimension only) Draw() function... :-/ { if ((*i).object->type == OTLine) ((Line *)((*i).object))->MovePointAtParameter((*i).t, delta); + else if ((*i).object->type == OTDimension) + ((Dimension *)((*i).object))->MovePointAtParameter((*i).t, delta); } } } @@ -652,6 +658,9 @@ void Line::SetDimensionOnLine(Dimension * dimension/*= NULL*/) // Make sure the Dimension is connected to us... Connect(dimension, 0); Connect(dimension, 1.0); + + dimension->position = position; + dimension->endpoint = endpoint; }