cache waveforms at clip level
This commit is contained in:
@@ -406,7 +406,7 @@ void PointerTool::InitiateDragInternal(Block *clicked_item,
|
||||
bool multitrim_enabled = IsClipTrimmable(clicked_item, clips, trim_mode);
|
||||
|
||||
// Create ghosts for trimming
|
||||
foreach (Block* clip_item, clips) {
|
||||
for (Block* clip_item : clips) {
|
||||
if (clip_item != clicked_item
|
||||
&& (!multitrim_enabled || !IsClipTrimmable(clip_item, clips, trim_mode))) {
|
||||
// Either multitrim is disabled or this clip is NOT the earliest/latest in its track. We
|
||||
@@ -481,7 +481,7 @@ void PointerTool::InitiateDragInternal(Block *clicked_item,
|
||||
// I'm only including it to prevent any potentially unintended behavior.
|
||||
if (clips.size() == 1 && !(modifiers & Qt::AltModifier)) {
|
||||
if (ClipBlock *adjacent_clip = dynamic_cast<ClipBlock*>(adjacent)) {
|
||||
foreach (Block *adjacent_link, adjacent_clip->block_links()) {
|
||||
for (Block *adjacent_link : adjacent_clip->block_links()) {
|
||||
adjacent_ghosts.append(AddGhostFromBlock(adjacent_link, flipped_mode));
|
||||
}
|
||||
}
|
||||
@@ -496,7 +496,7 @@ void PointerTool::InitiateDragInternal(Block *clicked_item,
|
||||
// expected to fill the remaining space (no gap needs to be created)
|
||||
ghost->SetData(TimelineViewGhostItem::kTrimIsARollEdit, static_cast<bool>(adjacent));
|
||||
|
||||
foreach (TimelineViewGhostItem *adjacent_ghost, adjacent_ghosts) {
|
||||
for (TimelineViewGhostItem *adjacent_ghost : adjacent_ghosts) {
|
||||
if (adjacent_ghost) {
|
||||
if (treat_trim_as_slide) {
|
||||
// We're sliding a transition rather than a pure trim/roll
|
||||
@@ -699,7 +699,7 @@ void PointerTool::FinishDrag(TimelineViewMouseEvent *event)
|
||||
// Place the copy instead of the original block
|
||||
block = static_cast<Block*>(Node::CopyNodeInGraph(block, command));
|
||||
if (ClipBlock *new_clip = dynamic_cast<ClipBlock*>(block)) {
|
||||
new_clip->waveform() = static_cast<ClipBlock*>(p.block)->waveform();
|
||||
new_clip->set_waveform(static_cast<ClipBlock*>(p.block)->waveform());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user