MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / duplicateSelectedNodes

Method duplicateSelectedNodes

Gui/NodeGraph40.cpp:208–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void
209NodeGraph::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
224void
225NodeGraph::duplicateSelectedNodes()

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.80
toStdStringMethod · 0.80
copyNodesInternalMethod · 0.80
pasteNodesInternalMethod · 0.80

Tested by

no test coverage detected