1 // rs_actionlayersedit.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_actionlayersedit.h"
17 #include "rs_dialogfactory.h"
18 #include "graphicview.h"
21 RS_ActionLayersEdit::RS_ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView):
22 RS_ActionInterface("Edit Layer", container, graphicView)
26 RS_ActionLayersEdit::~RS_ActionLayersEdit()
30 void RS_ActionLayersEdit::trigger()
32 RS_DEBUG->print("RS_ActionLayersEdit::trigger");
33 RS_Layer * layer = NULL;
37 layer = RS_DIALOGFACTORY->requestEditLayerDialog(graphic->getLayerList());
41 graphic->editLayer(graphic->getActiveLayer(), *layer);
43 // update updateable entities on the layer that has changed
44 for (RS_Entity * e = graphic->firstEntity(RS2::ResolveNone);
45 e != NULL; e = graphic->nextEntity(RS2::ResolveNone))
47 RS_Layer * l = e->getLayer();
49 if (l != NULL && l->getName() == layer->getName())
56 graphicView->redraw();
59 void RS_ActionLayersEdit::init(int status)
61 RS_ActionInterface::init(status);