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:
@@ -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()) {
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user