timeline: allow disabling waveforms

This commit is contained in:
itsmattkc
2021-03-10 14:23:59 +11:00
parent 60e828efa8
commit 5d59ecb699
4 changed files with 34 additions and 4 deletions
@@ -952,6 +952,11 @@ void TimelineWidget::ShowContextMenu()
toggle_audio_units->setChecked(use_audio_time_units_);
connect(toggle_audio_units, &QAction::triggered, this, &TimelineWidget::SetUseAudioTimeUnits);
QAction* show_waveforms = menu.addAction(tr("Show Waveforms"));
show_waveforms->setCheckable(true);
show_waveforms->setChecked(views_.first()->view()->GetShowWaveforms());
connect(show_waveforms, &QAction::triggered, this, &TimelineWidget::SetViewWaveformsEnabled);
menu.addSeparator();
QAction* properties_action = menu.addAction(tr("Properties"));
@@ -1020,6 +1025,13 @@ void TimelineWidget::ToolChanged()
HideSnaps();
}
void TimelineWidget::SetViewWaveformsEnabled(bool e)
{
foreach (TimelineAndTrackView* tview, views_) {
tview->view()->SetShowWaveforms(e);
}
}
void TimelineWidget::AddGhost(TimelineViewGhostItem *ghost)
{
ghost_items_.append(ghost);