| 196 | } |
| 197 | |
| 198 | void CtrlrPanelCanvas::addLayer(const ValueTree &layerTree) |
| 199 | { |
| 200 | CtrlrPanelCanvasLayer *l = new CtrlrPanelCanvasLayer(*this); |
| 201 | l->addMouseListener (this, true); |
| 202 | l->addKeyListener (this); |
| 203 | l->setWantsKeyboardFocus (true); |
| 204 | l->setBounds (getBounds()); |
| 205 | layers.add (l); |
| 206 | addAndMakeVisible (l); |
| 207 | |
| 208 | if (layerTree.isValid()) |
| 209 | { |
| 210 | l->restoreState (layerTree); |
| 211 | } |
| 212 | else |
| 213 | { |
| 214 | l->setProperty (Ids::uiPanelCanvasLayerIndex, layers.indexOf(l)); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | void CtrlrPanelCanvas::moveLayer(CtrlrPanelCanvasLayer *layerToMove, const bool moveUp) |
| 219 | { |
nothing calls this directly
no test coverage detected