1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-07 04:01:54 +01:00

AdornedRulerPanel updates its play region in idle time...

... Eliminating TP_DisplaySelection and making ProjectWindow independent of
AdornedRulerPanel
This commit is contained in:
Paul Licameli
2019-07-03 23:35:20 -04:00
parent 1c1aca521d
commit eb4eba6325
17 changed files with 28 additions and 85 deletions

View File

@@ -12,7 +12,6 @@ Paul Licameli split from AudacityProject.cpp
#include "Experimental.h"
#include "AdornedRulerPanel.h"
#include "AllThemeResources.h"
#include "Menus.h"
#include "Project.h"
@@ -1587,23 +1586,6 @@ void ProjectWindow::SkipEnd(bool shift)
ScrollIntoView(len);
}
void ProjectWindow::TP_DisplaySelection()
{
auto &project = mProject;
auto &ruler = AdornedRulerPanel::Get(project);
auto &viewInfo = ViewInfo::Get( project );
const auto &selectedRegion = viewInfo.selectedRegion;
auto &playRegion = ViewInfo::Get( project ).playRegion;
auto gAudioIO = AudioIOBase::Get();
if (!gAudioIO->IsBusy() && !playRegion.Locked())
ruler.SetPlayRegion( selectedRegion.t0(), selectedRegion.t1() );
else
// Cause ruler redraw anyway, because we may be zooming or scrolling
ruler.Refresh();
}
// TrackPanel callback method
void ProjectWindow::TP_ScrollLeft()
{