]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawhatch.cpp
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actiondrawhatch.cpp
index a85a58af7022ca419d316702443e9fa14f1f965c..a7fbe9a15bc287ff82dfafc153140465e04df726 100644 (file)
@@ -34,7 +34,7 @@ ActionDrawHatch::~ActionDrawHatch()
 void ActionDrawHatch::init(int status)
 {
        ActionInterface::init(status);
-       clearPreview();
+//     clearPreview();
 
        Hatch tmp(container, data);
        tmp.setLayerToActive();
@@ -55,7 +55,7 @@ void ActionDrawHatch::trigger()
 {
        DEBUG->print("ActionDrawHatch::trigger()");
 
-       deleteSnapper();
+//     deleteSnapper();
        Entity * e;
 
        // deselect unhatchable entities:
@@ -136,7 +136,6 @@ void ActionDrawHatch::trigger()
                }
 
                hatch->update();
-               graphicView->drawEntity(hatch);
                DIALOGFACTORY->commandMessage(tr("Hatch created successfully."));
        }
        else
@@ -151,21 +150,6 @@ void ActionDrawHatch::trigger()
 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");
 }
 
@@ -186,9 +170,9 @@ void ActionDrawHatch::mouseReleaseEvent(QMouseEvent * e)
        }
        else if (e->button() == Qt::RightButton)
        {
-               //deletePreview();
-               deleteSnapper();
                init(getStatus() - 1);
+//doesn't clear the preview or snapper.
+               graphicView->redraw();  // hm.
        }
 }