| 206 | } |
| 207 | |
| 208 | void |
| 209 | NodeGraph::duplicateSelectedNodes(const QPointF& pos) |
| 210 | { |
| 211 | if ( _imp->_selection.empty() && _imp->_selection.empty() ) { |
| 212 | Dialogs::warningDialog( tr("Duplicate").toStdString(), tr("You must select at least a node to duplicate first.").toStdString() ); |
| 213 | |
| 214 | return; |
| 215 | } |
| 216 | |
| 217 | ///Don't use the member clipboard as the user might have something copied |
| 218 | NodeClipBoard tmpClipboard; |
| 219 | _imp->copyNodesInternal(_imp->_selection, tmpClipboard); |
| 220 | std::list<std::pair<std::string, NodeGuiPtr> > newNodes; |
| 221 | _imp->pasteNodesInternal(tmpClipboard, _imp->_root->mapFromScene(pos), true, &newNodes); |
| 222 | } |
| 223 | |
| 224 | void |
| 225 | NodeGraph::duplicateSelectedNodes() |
nothing calls this directly
no test coverage detected