void ActionDrawHatch::init(int status)
{
ActionInterface::init(status);
- clearPreview();
+// clearPreview();
Hatch tmp(container, data);
tmp.setLayerToActive();
{
DEBUG->print("ActionDrawHatch::trigger()");
- deleteSnapper();
+// deleteSnapper();
Entity * e;
// deselect unhatchable entities:
}
hatch->update();
- graphicView->drawEntity(hatch);
DIALOGFACTORY->commandMessage(tr("Hatch created successfully."));
}
else
void ActionDrawHatch::mouseMoveEvent(QMouseEvent *)
{
DEBUG->print("ActionDrawHatch::mouseMoveEvent begin");
-
- /*if (getStatus()==SetPos) {
- Vector mouse = snapPoint(e);
- pos = mouse;
-
-
- deletePreview();
- if (hatch!=NULL && !hatch->isVisible()) {
- hatch->setVisible(true);
- }
- offset = Vector(graphicView->toGuiDX(pos.x),
- -graphicView->toGuiDY(pos.y));
- drawPreview();
- }*/
-
DEBUG->print("ActionDrawHatch::mouseMoveEvent end");
}
}
else if (e->button() == Qt::RightButton)
{
- //deletePreview();
- deleteSnapper();
init(getStatus() - 1);
+//doesn't clear the preview or snapper.
+ graphicView->redraw(); // hm.
}
}