1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 15:23:48 +01:00

Free ControlToolBar from cycles. That's all the toolbars now!

This commit is contained in:
Paul Licameli
2019-07-03 21:38:06 -04:00
parent acfd2b7010
commit 500ccb60b3
5 changed files with 16 additions and 18 deletions

View File

@@ -74,7 +74,6 @@
#include "../FileNames.h"
#include "../tracks/ui/Scrubbing.h"
#include "../prefs/TracksPrefs.h"
#include "../toolbars/ToolManager.h"
IMPLEMENT_CLASS(ControlToolBar, ToolBar);
@@ -745,20 +744,9 @@ void ControlToolBar::UpdateStatusBar()
);
}
bool ControlToolBar::IsTransportingPinned() const
{
if (!TracksPrefs::GetPinnedHeadPreference())
return false;
const auto &scrubber = Scrubber::Get( mProject );
return
!(scrubber.HasMark() &&
!scrubber.WasSpeedPlaying() &&
!Scrubber::ShouldScrubPinned());
}
void ControlToolBar::StartScrollingIfPreferred()
{
if ( IsTransportingPinned() )
if ( Scrubber::Get( mProject ).IsTransportingPinned() )
StartScrolling();
#ifdef __WXMAC__
else if (Scrubber::Get( mProject ).HasMark()) {

View File

@@ -36,8 +36,6 @@ class ControlToolBar final : public ToolBar {
ControlToolBar( AudacityProject &project );
virtual ~ControlToolBar();
bool IsTransportingPinned() const;
static ControlToolBar *Find( AudacityProject &project );
static ControlToolBar &Get( AudacityProject &project );
static const ControlToolBar &Get( const AudacityProject &project );