1 // rs_actionlayersadd.cpp
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 06/04/2010 Added this text. :-)
15 #include "rs_actionlayersadd.h"
17 #include "rs_dialogfactory.h"
20 RS_ActionLayersAdd::RS_ActionLayersAdd(RS_EntityContainer & container, GraphicView & graphicView):
21 RS_ActionInterface("Add Layer", container, graphicView)
25 RS_ActionLayersAdd::~RS_ActionLayersAdd()
29 void RS_ActionLayersAdd::trigger()
31 RS_DEBUG->print("add layer");
33 if (RS_DIALOGFACTORY != NULL && graphic)
35 RS_Layer * layer = RS_DIALOGFACTORY->requestNewLayerDialog(graphic->getLayerList());
38 graphic->addLayer(layer);
44 void RS_ActionLayersAdd::init(int status)
46 RS_ActionInterface::init(status);