timeline: overhauled pointer tool again
Allows dynamic switching between pointer/roll/slide since occasionally this behavior is interchangeable. Fixes a lot of transition behavior (but not all of it).
This commit is contained in:
@@ -35,7 +35,7 @@ TimelineWidget::RippleTool::RippleTool(TimelineWidget* parent) :
|
||||
void TimelineWidget::RippleTool::InitiateDrag(TimelineViewBlockItem *clicked_item,
|
||||
Timeline::MovementMode trim_mode)
|
||||
{
|
||||
InitiateDragInternal(clicked_item, trim_mode, kPointer, true);
|
||||
InitiateDragInternal(clicked_item, trim_mode, true, true, false);
|
||||
|
||||
if (parent()->ghost_items_.isEmpty()) {
|
||||
return;
|
||||
@@ -85,16 +85,16 @@ void TimelineWidget::RippleTool::InitiateDrag(TimelineViewBlockItem *clicked_ite
|
||||
|
||||
if (block_before_ripple->type() == Block::kGap) {
|
||||
// If this Block is already a Gap, ghost it now
|
||||
ghost = AddGhostFromBlock(block_before_ripple, track_ref, trim_mode, true);
|
||||
ghost = AddGhostFromBlock(block_before_ripple, track_ref, trim_mode);
|
||||
} else if (block_before_ripple->next()) {
|
||||
// Assuming this block is NOT at the end of the track (i.e. next != null)
|
||||
|
||||
// We're going to create a gap after it. If next is a gap, we can just use that
|
||||
if (block_before_ripple->next()->type() == Block::kGap) {
|
||||
ghost = AddGhostFromBlock(block_before_ripple->next(), track_ref, trim_mode, true);
|
||||
ghost = AddGhostFromBlock(block_before_ripple->next(), track_ref, trim_mode);
|
||||
} else {
|
||||
// If next is NOT a gap, we'll need to create one, for which we'll use a null ghost
|
||||
ghost = AddGhostFromNull(block_before_ripple->out(), block_before_ripple->out(), track_ref, trim_mode, true);
|
||||
ghost = AddGhostFromNull(block_before_ripple->out(), block_before_ripple->out(), track_ref, trim_mode);
|
||||
ghost->setData(TimelineViewGhostItem::kReferenceBlock, Node::PtrToValue(block_before_ripple));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user