1 // 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 "actionlayersedit.h"
17 #include "rs_dialogfactory.h"
18 #include "graphicview.h"
21 ActionLayersEdit::ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView):
22 ActionInterface("Edit Layer", container, graphicView)
26 ActionLayersEdit::~ActionLayersEdit()
30 void ActionLayersEdit::trigger()
32 RS_DEBUG->print("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 && l->getName() == layer->getName())
56 graphicView->redraw();
59 void ActionLayersEdit::init(int status)
61 ActionInterface::init(status);