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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user