ui: scroll zoom preference now specific to widget

Fixes #1597
This commit is contained in:
itsmattkc
2021-05-10 12:07:15 +10:00
parent 94b2cebeea
commit 72ed87d923
8 changed files with 62 additions and 10 deletions
@@ -979,6 +979,9 @@ void TimelineWidget::ShowContextMenu()
show_waveforms->setChecked(views_.first()->view()->GetShowWaveforms());
connect(show_waveforms, &QAction::triggered, this, &TimelineWidget::SetViewWaveformsEnabled);
QAction* scroll_zoom = views_.first()->view()->AddSetScrollZoomsByDefaultActionToMenu(&menu);
connect(scroll_zoom, &QAction::triggered, this, &TimelineWidget::SetScrollZoomsByDefaultOnAllViews);
menu.addSeparator();
QAction* properties_action = menu.addAction(tr("Properties"));
@@ -1077,6 +1080,13 @@ void TimelineWidget::TrackIndexChanged(int old, int now)
}
}
void TimelineWidget::SetScrollZoomsByDefaultOnAllViews(bool e)
{
foreach (TimelineAndTrackView* tview, views_) {
tview->view()->SetScrollZoomsByDefault(e);
}
}
void TimelineWidget::AddGhost(TimelineViewGhostItem *ghost)
{
ghost_items_.append(ghost);