X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Frs_actionblocksadd.cpp;h=d8b197fbb323ba0269ed70297b8856ac87e20978;hb=27d4a138d23453e93a833e9347444b828a971cb4;hp=5ef6ff19c32f9febaaef942a09761611f3bf778d;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/actions/rs_actionblocksadd.cpp b/src/actions/rs_actionblocksadd.cpp index 5ef6ff1..d8b197f 100644 --- a/src/actions/rs_actionblocksadd.cpp +++ b/src/actions/rs_actionblocksadd.cpp @@ -10,7 +10,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid qcadlib Professional Edition licenses may use +** Licensees holding valid qcadlib Professional Edition licenses may use ** this file in accordance with the qcadlib Commercial License ** Agreement provided with the Software. ** @@ -26,12 +26,11 @@ #include "rs_actionblocksadd.h" -#include "rs_graphic.h" +#include "drawing.h" #include "rs_dialogfactory.h" -RS_ActionBlocksAdd::RS_ActionBlocksAdd(RS_EntityContainer& container, - RS_GraphicView& graphicView) - :RS_ActionInterface("Add Block", container, graphicView) +RS_ActionBlocksAdd::RS_ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView): + RS_ActionInterface("Add Block", container, graphicView) { } @@ -41,17 +40,17 @@ QAction * RS_ActionBlocksAdd::createGUIAction(RS2::ActionType /*type*/, QObject // QAction * action = new QAction(tr("Add Block"), tr("&Add Block"), // QKeySequence(), NULL); QAction * action = new QAction(tr("&Add Block"), 0); - action->setStatusTip(tr("Add Block")); - return action; + action->setStatusTip(tr("Add Block")); + return action; } void RS_ActionBlocksAdd::trigger() { - RS_DEBUG->print("adding block"); - //RS_Block* block = new RS_Block(container, "", Vector(0.0,0.0)); + RS_DEBUG->print("adding block"); + //RS_Block* block = new RS_Block(container, "", Vector(0.0,0.0)); - if (graphic != NULL) - { + if (graphic != NULL) + { RS_BlockList * blockList = graphic->getBlockList(); if (blockList != NULL) @@ -59,21 +58,17 @@ void RS_ActionBlocksAdd::trigger() RS_BlockData d = RS_DIALOGFACTORY->requestNewBlockDialog(blockList); if (d.isValid()) - { - graphic->addBlock(new RS_Block(container, d)); - } + graphic->addBlock(new RS_Block(container, d)); } - } + } - finish(); + finish(); } - - void RS_ActionBlocksAdd::init(int status) { - RS_ActionInterface::init(status); - trigger(); + RS_ActionInterface::init(status); + trigger(); } // EOF