+#else
+ Vector mouse = graphicView->SnapPoint(e);
+
+ if (getStatus() == SetNextPoint && startPoint.valid)
+ {
+ // We have to draw a line or arc depending on the state of the "Arc"
+ // checkbox.
+ // We'll start with lines...
+ graphicView->preview.clear();
+ Line * line = new Line(&(graphicView->preview), LineData(startPoint, mouse));
+
+ if (polyline)
+ graphicView->preview.addEntity(polyline);
+
+ graphicView->preview.addEntity(line);
+ }
+
+ graphicView->redraw(); //hm.
+#endif
+
+#if 0
+ Vector mouse = graphicView->snapper.snapPoint(e);
+ DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point: OK");
+
+ if (getStatus() == SetEndpoint && data.startpoint.valid)
+ {
+ DEBUG->print("ActionDrawLine::mouseMoveEvent: update preview");
+ // This is lame. Creating a new Line every time the endpoint moves.
+ // Surely we can alter the line entity inside the preview, no?
+#if 0
+ graphicView->preview.clear(); // Remove entities from the container
+ Line * line = new Line(&(graphicView->preview), LineData(data.startpoint, mouse));
+ graphicView->preview.addEntity(line);
+#else
+ // We can assume there's only one line in there, can't we?
+ Line * line = (Line *)graphicView->preview.firstEntity(RS2::ResolveNone);
+
+ if (line)
+ {
+ line->setEndpoint(mouse);
+ }
+ else
+ {
+ line = new Line(&(graphicView->preview), LineData(data.startpoint, mouse));
+ graphicView->preview.addEntity(line);
+ }
+#endif
+ }
+
+ //hm. [ok, this works. :-D]
+ graphicView->redraw();
+#endif