reimplemented rubberband and hand drag routines
This commit is contained in:
@@ -25,5 +25,19 @@
|
||||
TimelineWidget::HandTool::HandTool(TimelineWidget* parent) :
|
||||
Tool(parent)
|
||||
{
|
||||
set_drag_mode(QGraphicsView::ScrollHandDrag);
|
||||
}
|
||||
|
||||
void TimelineWidget::HandTool::MousePress(TimelineViewMouseEvent *)
|
||||
{
|
||||
parent()->StartHandDrag();
|
||||
}
|
||||
|
||||
void TimelineWidget::HandTool::MouseMove(TimelineViewMouseEvent *)
|
||||
{
|
||||
parent()->MoveHandDrag();
|
||||
}
|
||||
|
||||
void TimelineWidget::HandTool::MouseRelease(TimelineViewMouseEvent *)
|
||||
{
|
||||
parent()->EndHandDrag();
|
||||
}
|
||||
|
||||
@@ -237,8 +237,8 @@ void TimelineWidget::ImportTool::DragDrop(TimelineViewMouseEvent *event)
|
||||
if (event->GetModifiers() & Qt::ControlModifier) {
|
||||
//emit parent()->RequestInsertBlockAtTime(clip, ghost->GetAdjustedIn());
|
||||
} else {
|
||||
new TrackPlaceBlockCommand(parent()->timeline_node_->track_list(ghost->Track().type()),
|
||||
ghost->Track().index(),
|
||||
new TrackPlaceBlockCommand(parent()->timeline_node_->track_list(ghost->GetAdjustedTrack().type()),
|
||||
ghost->GetAdjustedTrack().index(),
|
||||
clip,
|
||||
ghost->GetAdjustedIn(),
|
||||
command);
|
||||
|
||||
@@ -38,7 +38,6 @@ TimelineWidget::PointerTool::PointerTool(TimelineWidget *parent) :
|
||||
track_movement_allowed_(true),
|
||||
rubberband_selecting_(false)
|
||||
{
|
||||
set_drag_mode(QGraphicsView::RubberBandDrag);
|
||||
}
|
||||
|
||||
void TimelineWidget::PointerTool::MousePress(TimelineViewMouseEvent *event)
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
|
||||
TimelineWidget::Tool::Tool(TimelineWidget *parent) :
|
||||
dragging_(false),
|
||||
parent_(parent),
|
||||
drag_mode_(QGraphicsView::NoDrag)
|
||||
parent_(parent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -53,16 +52,6 @@ olive::timeline::MovementMode TimelineWidget::Tool::FlipTrimMode(const olive::ti
|
||||
return trim_mode;
|
||||
}
|
||||
|
||||
const QGraphicsView::DragMode &TimelineWidget::Tool::drag_mode()
|
||||
{
|
||||
return drag_mode_;
|
||||
}
|
||||
|
||||
void TimelineWidget::Tool::set_drag_mode(const QGraphicsView::DragMode &mode)
|
||||
{
|
||||
drag_mode_ = mode;
|
||||
}
|
||||
|
||||
TimelineViewBlockItem *TimelineWidget::Tool::GetItemAtScenePos(const TimelineCoordinate& coord)
|
||||
{
|
||||
QMapIterator<Block*, TimelineViewBlockItem*> iterator(parent()->block_items_);
|
||||
|
||||
Reference in New Issue
Block a user