X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Frs_actiondrawspline.cpp;h=faa11ebf88e55bd2f800f73c75345cd615fef61c;hb=3f46c180da0806c9c263e6d87d0f1404632402da;hp=ba4e6811fef276d981bcd1578f5f77a70d53b548;hpb=ee048ce722e7beb53e702825bb3285cd5cacd8bb;p=architektonas diff --git a/src/actions/rs_actiondrawspline.cpp b/src/actions/rs_actiondrawspline.cpp index ba4e681..faa11eb 100644 --- a/src/actions/rs_actiondrawspline.cpp +++ b/src/actions/rs_actiondrawspline.cpp @@ -104,12 +104,10 @@ void RS_ActionDrawSpline::mouseMoveEvent(QMouseEvent * e) tmpSpline->update(); preview->addEntity(tmpSpline); -// Q3ValueList cpts = tmpSpline->getControlPoints(); -// Q3ValueList::iterator it; QList cpts = tmpSpline->getControlPoints(); QList::iterator it; - for (it = cpts.begin(); it != cpts.end(); ++it) + for(it = cpts.begin(); it != cpts.end(); ++it) preview->addEntity(new RS_Point(preview, RS_PointData(*it))); drawPreview(); @@ -120,15 +118,16 @@ void RS_ActionDrawSpline::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawSpline::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { if (getStatus() == SetNextPoint) trigger(); + deletePreview(); clearPreview(); deleteSnapper();