timebasedwidget: rewrote scroll catchup code
Code is much better. Less hacky queuing, implements cooldowns to improve navigation, and introduces a framework so that subclasses can make use of catchup/cooldown code too with any scrollbar they want
This commit is contained in:
@@ -290,8 +290,7 @@ void KeyframeView::mouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
if (event->buttons()) {
|
||||
// Signal cursor pos in case we should scroll to catch up to it
|
||||
QPointF scene_pos = mapToScene(event->pos());
|
||||
emit Dragged(scene_pos.x(), scene_pos.y());
|
||||
emit Dragged(event->pos().x(), event->pos().y());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,6 +308,7 @@ void KeyframeView::mouseReleaseEvent(QMouseEvent *event)
|
||||
selection_manager_.DragStop(command);
|
||||
KeyframeDragRelease(event, command);
|
||||
Core::instance()->undo_stack()->push(command);
|
||||
emit Released();
|
||||
} else if (selection_manager_.IsRubberBanding()) {
|
||||
selection_manager_.RubberBandStop();
|
||||
Redraw();
|
||||
|
||||
Reference in New Issue
Block a user