timeline: removed unused variable in undo command
This commit is contained in:
@@ -53,11 +53,10 @@ void TimelineWidget::RippleTool::MouseReleaseInternal(TimelineViewMouseEvent *ev
|
||||
|
||||
Block* block_to_append_gap_to = Node::ValueToPtr<Block>(ghost->data(TimelineViewGhostItem::kReferenceBlock));
|
||||
|
||||
new TrackInsertBlockBetweenBlocksCommand(parent()->GetTrackFromReference(ghost->Track()),
|
||||
gap,
|
||||
block_to_append_gap_to,
|
||||
block_to_append_gap_to->next(),
|
||||
command);
|
||||
new TrackInsertBlockAfterCommand(parent()->GetTrackFromReference(ghost->Track()),
|
||||
gap,
|
||||
block_to_append_gap_to,
|
||||
command);
|
||||
}
|
||||
} else {
|
||||
// This was a Block that already existed
|
||||
|
||||
@@ -106,25 +106,23 @@ void TrackRippleRemoveBlockCommand::undo()
|
||||
}
|
||||
}
|
||||
|
||||
TrackInsertBlockBetweenBlocksCommand::TrackInsertBlockBetweenBlocksCommand(TrackOutput *track,
|
||||
TrackInsertBlockAfterCommand::TrackInsertBlockAfterCommand(TrackOutput *track,
|
||||
Block *block,
|
||||
Block *before,
|
||||
Block *after,
|
||||
QUndoCommand *parent) :
|
||||
QUndoCommand(parent),
|
||||
track_(track),
|
||||
block_(block),
|
||||
before_(before),
|
||||
after_(after)
|
||||
before_(before)
|
||||
{
|
||||
}
|
||||
|
||||
void TrackInsertBlockBetweenBlocksCommand::redo()
|
||||
void TrackInsertBlockAfterCommand::redo()
|
||||
{
|
||||
track_->InsertBlockAfter(block_, before_);
|
||||
}
|
||||
|
||||
void TrackInsertBlockBetweenBlocksCommand::undo()
|
||||
void TrackInsertBlockAfterCommand::undo()
|
||||
{
|
||||
track_->RippleRemoveBlock(block_);
|
||||
}
|
||||
|
||||
@@ -108,9 +108,9 @@ private:
|
||||
Block* block_;
|
||||
};
|
||||
|
||||
class TrackInsertBlockBetweenBlocksCommand : public QUndoCommand {
|
||||
class TrackInsertBlockAfterCommand : public QUndoCommand {
|
||||
public:
|
||||
TrackInsertBlockBetweenBlocksCommand(TrackOutput* track, Block* block, Block* before, Block* after, QUndoCommand* parent = nullptr);
|
||||
TrackInsertBlockAfterCommand(TrackOutput* track, Block* block, Block* before, QUndoCommand* parent = nullptr);
|
||||
|
||||
virtual void redo() override;
|
||||
virtual void undo() override;
|
||||
@@ -121,7 +121,6 @@ private:
|
||||
Block* block_;
|
||||
|
||||
Block* before_;
|
||||
Block* after_;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user