Make Offlining footage an UndoCommand

Created a new UndoCommand in ProjectViewModel that set the footage
input to a nullptr and resets it to the correct stream on undo.
This commit is contained in:
Thomas Wilshaw
2020-09-28 14:33:58 +01:00
parent c1e345611d
commit 5bb9cb0cca
4 changed files with 75 additions and 13 deletions
+21
View File
@@ -194,6 +194,27 @@ public:
};
class OfflineFootageCommand : public UndoCommand {
public:
OfflineFootageCommand(ProjectViewModel* model, ItemPtr item, QMap<Node*, StreamPtr> nodes, QUndoCommand* parent = nullptr);
virtual Project* GetRelevantProject() const override;
protected:
virtual void redo_internal() override;
virtual void undo_internal() override;
private:
ProjectViewModel* model_;
ItemPtr item_;
Item* parent_;
QMap<Node*, StreamPtr> nodes_;
};
private:
/**
* @brief Retrieve the index of `item` in its parent