timeline: made ReplaceBlocksWithGaps more accessible for other parts of the program
This commit is contained in:
@@ -505,16 +505,11 @@ void TimelineWidget::DeleteSelected(bool ripple)
|
|||||||
{
|
{
|
||||||
QList<TimelineViewBlockItem *> selected_list = GetSelectedBlocks();
|
QList<TimelineViewBlockItem *> selected_list = GetSelectedBlocks();
|
||||||
QList<Block*> blocks_to_delete;
|
QList<Block*> blocks_to_delete;
|
||||||
QList<TrackReference> tracks_affected;
|
|
||||||
|
|
||||||
foreach (TimelineViewBlockItem* item, selected_list) {
|
foreach (TimelineViewBlockItem* item, selected_list) {
|
||||||
Block* b = item->block();
|
Block* b = item->block();
|
||||||
|
|
||||||
blocks_to_delete.append(b);
|
blocks_to_delete.append(b);
|
||||||
|
|
||||||
if (!tracks_affected.contains(item->Track())) {
|
|
||||||
tracks_affected.append(item->Track());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// No-op if nothing is selected
|
// No-op if nothing is selected
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ public:
|
|||||||
|
|
||||||
void RestoreSplitterState(const QByteArray& state);
|
void RestoreSplitterState(const QByteArray& state);
|
||||||
|
|
||||||
|
static void ReplaceBlocksWithGaps(const QList<Block *>& blocks, bool remove_from_graph, QUndoCommand* command);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void BlocksSelected(const QList<Block*>& selected_blocks);
|
void BlocksSelected(const QList<Block*>& selected_blocks);
|
||||||
|
|
||||||
@@ -460,8 +462,6 @@ private:
|
|||||||
|
|
||||||
void InsertGapsAt(const rational& time, const rational& length, QUndoCommand* command);
|
void InsertGapsAt(const rational& time, const rational& length, QUndoCommand* command);
|
||||||
|
|
||||||
void ReplaceBlocksWithGaps(const QList<Block *>& blocks, bool remove_from_graph, QUndoCommand* command);
|
|
||||||
|
|
||||||
void SetBlockLinksSelected(Block *block, bool selected);
|
void SetBlockLinksSelected(Block *block, bool selected);
|
||||||
|
|
||||||
QVector<Timeline::EditToInfo> GetEditToInfo(const rational &playhead_time, Timeline::MovementMode mode);
|
QVector<Timeline::EditToInfo> GetEditToInfo(const rational &playhead_time, Timeline::MovementMode mode);
|
||||||
|
|||||||
Reference in New Issue
Block a user