3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 07/12/2010 Added this text. :-)
15 #include "actionblocksadd.h"
18 #include "rs_dialogfactory.h"
20 ActionBlocksAdd::ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView):
21 ActionInterface("Add Block", container, graphicView)
25 ActionBlocksAdd::~ActionBlocksAdd()
29 void ActionBlocksAdd::trigger()
31 RS_DEBUG->print("adding block");
35 RS_BlockList * blockList = graphic->getBlockList();
39 RS_BlockData d = RS_DIALOGFACTORY->requestNewBlockDialog(blockList);
42 graphic->addBlock(new RS_Block(container, d));
49 void ActionBlocksAdd::init(int status)
51 ActionInterface::init(status);