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

static Scrubber::Get()...

... not member functions of AudacityProject
This commit is contained in:
Paul Licameli
2019-01-22 14:59:25 -05:00
parent 15dd230ee1
commit 2f0a76ed10
13 changed files with 63 additions and 41 deletions

View File

@@ -1238,7 +1238,6 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
mScrubOverlay = std::make_shared<ScrubbingOverlay>(this);
mScrubber = std::make_unique<Scrubber>(this);
#endif
mPlaybackScroller = std::make_unique<PlaybackScroller>(this);
@@ -1854,11 +1853,12 @@ void AudacityProject::OnScrollRightButton(wxScrollEvent & /*event*/)
bool AudacityProject::MayScrollBeyondZero() const
{
auto &project = *this;
auto &scrubber = Scrubber::Get( project );
auto &viewInfo = ViewInfo::Get( project );
if (viewInfo.bScrollBeyondZero)
return true;
if (GetScrubber().HasMark() ||
if (scrubber.HasMark() ||
IsAudioActive()) {
if (mPlaybackScroller) {
auto mode = mPlaybackScroller->GetMode();