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:
itsmattkc
2022-07-15 10:59:51 -07:00
parent 4b8febd10d
commit e4fd2d5d2c
11 changed files with 103 additions and 20 deletions
+2 -2
View File
@@ -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();