moved timeline undoable commands to using the new NodeAddCommand
Previous iteration used some "magic code" that added clips automatically to the timeline. This was functional but ultimately outside of the undo commands' control meaning nodes could be infinitely added and abandoned. This makes the add process part of the undo command which means it's all undoable as the user would expect.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "node/graph.h"
|
||||
#include "node/node.h"
|
||||
#include "nodeviewitem.h"
|
||||
|
||||
/**
|
||||
* @brief An undoable commnd for connecting two NodeParams together
|
||||
@@ -62,7 +63,9 @@ private:
|
||||
|
||||
class NodeRemoveCommand : public QUndoCommand {
|
||||
public:
|
||||
NodeRemoveCommand(NodeGraph* graph, const QList<Node*>& nodes, QUndoCommand* parent = nullptr);
|
||||
NodeRemoveCommand(NodeGraph* graph,
|
||||
const QList<Node*>& nodes,
|
||||
QUndoCommand* parent = nullptr);
|
||||
|
||||
virtual void redo() override;
|
||||
virtual void undo() override;
|
||||
|
||||
Reference in New Issue
Block a user