added clone functions for nodes
Since nodes are are extremely derivative types, we use a clone/copy function to produce new types of the derived class easily.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include <QDebug>
|
||||
Block* CreateSplitBlock(Block* block, rational point, QObject* parent = nullptr)
|
||||
{
|
||||
Block* copy = block->copy();
|
||||
Block* copy = static_cast<Block*>(block->copy());
|
||||
copy->set_length_and_media_in(block->length() - (point - block->in()));
|
||||
copy->setParent(parent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user