Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/kis_node_manager.cpp
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Line(s) | 230 | { | |||
---|---|---|---|---|---|
277 | connect(action, SIGNAL(triggered()), this, SLOT(selectLockedNodes())); | 277 | connect(action, SIGNAL(triggered()), this, SLOT(selectLockedNodes())); | ||
278 | 278 | | |||
279 | action = actionManager->createAction("select_invisible_layers"); | 279 | action = actionManager->createAction("select_invisible_layers"); | ||
280 | connect(action, SIGNAL(triggered()), this, SLOT(selectInvisibleNodes())); | 280 | connect(action, SIGNAL(triggered()), this, SLOT(selectInvisibleNodes())); | ||
281 | 281 | | |||
282 | action = actionManager->createAction("select_unlocked_layers"); | 282 | action = actionManager->createAction("select_unlocked_layers"); | ||
283 | connect(action, SIGNAL(triggered()), this, SLOT(selectUnlockedNodes())); | 283 | connect(action, SIGNAL(triggered()), this, SLOT(selectUnlockedNodes())); | ||
284 | 284 | | |||
285 | action = actionManager->createAction("new_from_visible"); | ||||
286 | connect(action, SIGNAL(triggered()), this, SLOT(createFromVisible())); | ||||
287 | | ||||
285 | NEW_LAYER_ACTION("add_new_paint_layer", "KisPaintLayer"); | 288 | NEW_LAYER_ACTION("add_new_paint_layer", "KisPaintLayer"); | ||
286 | 289 | | |||
287 | NEW_LAYER_ACTION("add_new_group_layer", "KisGroupLayer"); | 290 | NEW_LAYER_ACTION("add_new_group_layer", "KisGroupLayer"); | ||
288 | 291 | | |||
289 | NEW_LAYER_ACTION("add_new_clone_layer", "KisCloneLayer"); | 292 | NEW_LAYER_ACTION("add_new_clone_layer", "KisCloneLayer"); | ||
290 | 293 | | |||
291 | NEW_LAYER_ACTION("add_new_shape_layer", "KisShapeLayer"); | 294 | NEW_LAYER_ACTION("add_new_shape_layer", "KisShapeLayer"); | ||
292 | 295 | | |||
▲ Show 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | 462 | { | |||
491 | } else if (nodeType == "KisSelectionMask") { | 494 | } else if (nodeType == "KisSelectionMask") { | ||
492 | m_d->maskManager.createSelectionMask(activeNode, copyFrom, false); | 495 | m_d->maskManager.createSelectionMask(activeNode, copyFrom, false); | ||
493 | } else if (nodeType == "KisFileLayer") { | 496 | } else if (nodeType == "KisFileLayer") { | ||
494 | m_d->layerManager.addFileLayer(activeNode); | 497 | m_d->layerManager.addFileLayer(activeNode); | ||
495 | } | 498 | } | ||
496 | 499 | | |||
497 | } | 500 | } | ||
498 | 501 | | |||
502 | void KisNodeManager::createFromVisible() | ||||
503 | { | ||||
504 | KisLayerUtils::newLayerFromVisible(m_d->view->image(), m_d->view->image()->root()->lastChild()); | ||||
505 | } | ||||
506 | | ||||
499 | KisLayerSP KisNodeManager::createPaintLayer() | 507 | KisLayerSP KisNodeManager::createPaintLayer() | ||
500 | { | 508 | { | ||
501 | KisNodeSP activeNode = this->activeNode(); | 509 | KisNodeSP activeNode = this->activeNode(); | ||
502 | if (!activeNode) { | 510 | if (!activeNode) { | ||
503 | activeNode = m_d->view->image()->root(); | 511 | activeNode = m_d->view->image()->root(); | ||
504 | } | 512 | } | ||
505 | 513 | | |||
506 | return m_d->layerManager.addLayer(activeNode); | 514 | return m_d->layerManager.addLayer(activeNode); | ||
▲ Show 20 Lines • Show All 795 Lines • Show Last 20 Lines |