]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/rs_actiondrawlinepolygon2.cpp
Refactored CAD tool bars to use predefined actions.
[architektonas] / src / actions / rs_actiondrawlinepolygon2.cpp
index feaa99f98f04a164ae39ec5b2d6b1942caddb825..fb783d61f98746b37c4151a6708c295a6e8372dd 100644 (file)
 
 #include "rs_actiondrawlinepolygon2.h"
 
+#include "rs_commandevent.h"
 #include "rs_creation.h"
 #include "rs_dialogfactory.h"
-#include "rs_graphicview.h"
+#include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLinePolygon2::RS_ActionDrawLinePolygon2(RS_EntityContainer & container, RS_GraphicView & graphicView): RS_PreviewActionInterface("Draw Polygons",
+RS_ActionDrawLinePolygon2::RS_ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Polygons",
                container, graphicView)
 {
        corner1 = Vector(false);
@@ -85,12 +86,12 @@ void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e)
 
 void RS_ActionDrawLinePolygon2::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)
        {
                deletePreview();
                clearPreview();