X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawline.cpp;h=8bc0bb13401dca28548f90df534bed0bca53addf;hb=5adb444f3e523d3fd028617ced72d1ea6661db21;hp=a0be6db85b6a1812c2b6164fc4d61e61173e1c61;hpb=16354e0421b316a62c6b9f7b0b4f3b8cf6f06284;p=architektonas diff --git a/src/actions/actiondrawline.cpp b/src/actions/actiondrawline.cpp index a0be6db..8bc0bb1 100644 --- a/src/actions/actiondrawline.cpp +++ b/src/actions/actiondrawline.cpp @@ -29,12 +29,8 @@ ActionDrawLine::ActionDrawLine(EntityContainer & container, GraphicView & graphi { DEBUG->print("ActionDrawLine::ActionDrawLine"); reset(); - //hm. -// graphicView.snapper.SetContainer(&container); -// graphicView.snapper.SetGraphicView(&graphicView); -// graphicView.snapper.SetVisible(); -// graphicView.preview.SetVisible(); DEBUG->print("ActionDrawLine::ActionDrawLine: OK"); +//printf("ActionDrawLine(): preview is%s visible, snapper is%s visible...\n", (graphicView.preview.Visible() ? "" : " NOT"), (graphicView.snapper.Visible() ? "" : " NOT")); } ActionDrawLine::~ActionDrawLine() @@ -97,7 +93,8 @@ void ActionDrawLine::mouseMoveEvent(QMouseEvent * e) DEBUG->print("ActionDrawLine::mouseMoveEvent begin"); DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point"); - Vector mouse = graphicView->snapper.snapPoint(e); +// Vector mouse = graphicView->snapper.snapPoint(e); + Vector mouse = graphicView->SnapPoint(e); DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point: OK"); if (getStatus() == SetEndpoint && data.startpoint.valid) @@ -125,6 +122,10 @@ void ActionDrawLine::mouseMoveEvent(QMouseEvent * e) #endif } +//OK, snapper & preview are set as NOT visible... why??? +//becuz other things are created in the meantime which turn this stuff off, treating +//it like it isn't a shared resource which it is... +//printf("ActionDrawLine::mouseMoveEvent(): preview is%s visible, snapper is%s visible...\n", (graphicView->preview.Visible() ? "" : " NOT"), (graphicView->snapper.Visible() ? "" : " NOT")); //hm. [ok, this works. :-D] graphicView->redraw(); DEBUG->print("ActionDrawLine::mouseMoveEvent end"); @@ -134,23 +135,19 @@ void ActionDrawLine::mouseReleaseEvent(QMouseEvent * e) { if (e->button() == Qt::LeftButton) { - Vector ce(graphicView->snapper.snapPoint(e)); +// Vector ce(graphicView->snapper.snapPoint(e)); + Vector ce(graphicView->SnapPoint(e)); coordinateEvent(&ce); } else if (e->button() == Qt::RightButton) { -// if (getStatus() == 0) -// { -// graphicView->snapper.SetVisible(false); -// graphicView->preview.SetVisible(false); -// } - init(getStatus() - 1); } //hm. [Seems to work OK.] - graphicView->preview.clear(); // Remove entities from container - graphicView->redraw(); + //shouldn't need this... +// graphicView->preview.clear(); // Remove entities from container +// graphicView->redraw(); } void ActionDrawLine::coordinateEvent(Vector * e)