| 690 | } |
| 691 | |
| 692 | DecloneMultipleNodesCommand::DecloneMultipleNodesCommand(NodeGraph* graph, |
| 693 | const std::list<NodeGuiPtr > & nodes, |
| 694 | QUndoCommand *parent) |
| 695 | : QUndoCommand(parent) |
| 696 | , _nodes() |
| 697 | , _graph(graph) |
| 698 | { |
| 699 | for (std::list<NodeGuiPtr >::const_iterator it = nodes.begin(); it != nodes.end(); ++it) { |
| 700 | NodeToDeclone n; |
| 701 | n.node = *it; |
| 702 | n.master = (*it)->getNode()->getMasterNode(); |
| 703 | assert( n.master.lock() ); |
| 704 | _nodes.push_back(n); |
| 705 | } |
| 706 | } |
| 707 | |
| 708 | DecloneMultipleNodesCommand::~DecloneMultipleNodesCommand() |
| 709 | { |