From 13e297604b00615d47352538e3c82ea1ac700d4c Mon Sep 17 00:00:00 2001 From: Renaud G Date: Mon, 28 Nov 2016 00:36:15 +0100 Subject: -Add API for copying a branch of execution node. -Allow to use if node several times. --- node/paintnode.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'node/paintnode.cpp') diff --git a/node/paintnode.cpp b/node/paintnode.cpp index 02a9358..5a85590 100644 --- a/node/paintnode.cpp +++ b/node/paintnode.cpp @@ -124,3 +124,12 @@ void PainterNode::insertColorItem(QString color, int value) ColorItem item(color,value); m_colors.append(item); } +ExecutionNode* PainterNode::getCopy() const +{ + PainterNode* node = new PainterNode(); + if(NULL!=m_nextNode) + { + node->setNextNode(m_nextNode->getCopy()); + } + return node; +} -- cgit v1.2.3-70-g09d2