implemented inverted timeline scroll axes
Timeline scrolls horizontally by default with a preference to disable that functionality.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <QtMath>
|
||||
#include <QPen>
|
||||
|
||||
#include "config/config.h"
|
||||
#include "common/flipmodifiers.h"
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "core.h"
|
||||
@@ -113,6 +114,21 @@ void TimelineView::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
emit MouseDoubleClicked(&timeline_event);
|
||||
}
|
||||
|
||||
void TimelineView::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
if (Config::Current()["InvertTimelineScrollAxes"].toBool()) {
|
||||
QWheelEvent e(event->pos(),
|
||||
event->delta(),
|
||||
event->buttons(),
|
||||
event->modifiers(),
|
||||
event->orientation() == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal);
|
||||
|
||||
QGraphicsView::wheelEvent(&e);
|
||||
} else {
|
||||
QGraphicsView::wheelEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
void TimelineView::dragEnterEvent(QDragEnterEvent *event)
|
||||
{
|
||||
TimelineViewMouseEvent timeline_event(ScreenToCoordinate(event->pos()),
|
||||
|
||||
Reference in New Issue
Block a user