X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdrawlineaction.cpp;h=5490e9829bcc553fc71fbd8213c402a4b66a74b8;hb=31dd33b097661175a86b6799df525972055099fb;hp=27b9513c04574e395ca22a7273c3b3ed126b003d;hpb=51de783e1c8d149c9dd9bd0999f2ad25dbe6edf2;p=architektonas diff --git a/src/drawlineaction.cpp b/src/drawlineaction.cpp index 27b9513..5490e98 100644 --- a/src/drawlineaction.cpp +++ b/src/drawlineaction.cpp @@ -80,12 +80,22 @@ DrawLineAction::~DrawLineAction() { p2 = p1; state = NEXT_POINT; + line = NULL; } else if (state == NEXT_POINT) { + Line * oldLine = line; // We create the new object here, and then pass it off to the // DrawingView which stuffs it into the document. line = new Line(p1, p2); + + // Connect Lines by default + if (oldLine) + { + oldLine->Connect(line, 0); + line->Connect(oldLine, 1.0); + } + // We don't need no stinkin' sentinels, when we have signals & slots! emit ObjectReady(line); @@ -103,7 +113,7 @@ DrawLineAction::~DrawLineAction() p1Save = p1; p1 = p2; state = FIRST_POINT; - emit(NeedRefresh()); + emit NeedRefresh(); } }