paramview: changed to static viewer-bound and fixed various scrolling issues

This commit is contained in:
itsmattkc
2020-06-22 00:38:00 +10:00
parent e97b5a9a14
commit 1725f01459
12 changed files with 81 additions and 70 deletions
@@ -45,7 +45,6 @@ TimelineView::TimelineView(Qt::Alignment vertical_alignment, QWidget *parent) :
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
setBackgroundRole(QPalette::Window);
setContextMenuPolicy(Qt::CustomContextMenu);
SetLimitYAxis(true);
viewport()->setMouseTracking(true);
connect(scene(), &QGraphicsScene::selectionChanged, this, &TimelineView::SelectionChanged);
@@ -39,7 +39,6 @@ TimelineViewBase::TimelineViewBase(QWidget *parent) :
playhead_scene_left_(-1),
playhead_scene_right_(-1),
dragging_playhead_(false),
limit_y_axis_(false),
snapped_(false),
snap_service_(nullptr)
{
@@ -271,10 +270,4 @@ bool TimelineViewBase::WheelEventIsAZoomEvent(QWheelEvent *event)
return (static_cast<bool>(event->modifiers() & Qt::ControlModifier) == !Config::Current()["ScrollZooms"].toBool());
}
void TimelineViewBase::SetLimitYAxis(bool)
{
limit_y_axis_ = true;
UpdateSceneRect();
}
OLIVE_NAMESPACE_EXIT
@@ -73,8 +73,6 @@ protected:
bool WheelEventIsAZoomEvent(QWheelEvent* event);
void SetLimitYAxis(bool e);
rational GetPlayheadTime() const;
bool PlayheadPress(QMouseEvent* event);
@@ -97,8 +95,6 @@ private:
QGraphicsScene scene_;
bool limit_y_axis_;
bool snapped_;
QList<rational> snap_time_;