mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-09 06:06:24 +01:00
New preference for pinned play head, also in Transport menu
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
#include "../widgets/Meter.h"
|
||||
|
||||
#include "../tracks/ui/Scrubbing.h"
|
||||
#include "../prefs/PlaybackPrefs.h"
|
||||
|
||||
IMPLEMENT_CLASS(ControlToolBar, ToolBar);
|
||||
|
||||
@@ -635,15 +636,16 @@ int ControlToolBar::PlayPlayRegion(const SelectedRegion &selectedRegion,
|
||||
NoteTrackArray(),
|
||||
#endif
|
||||
tcp0, tcp1, myOptions);
|
||||
} else
|
||||
{
|
||||
}
|
||||
else {
|
||||
// Cannot create cut preview tracks, clean up and exit
|
||||
SetPlay(false);
|
||||
SetStop(false);
|
||||
SetRecord(false);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Lifted the following into AudacityProject::GetDefaultPlayOptions()
|
||||
/*
|
||||
if (!timetrack) {
|
||||
@@ -682,6 +684,8 @@ int ControlToolBar::PlayPlayRegion(const SelectedRegion &selectedRegion,
|
||||
return -1;
|
||||
}
|
||||
|
||||
StartScrollingIfPreferred();
|
||||
|
||||
// Let other UI update appearance
|
||||
if (p)
|
||||
p->GetRulerPanel()->HideQuickPlayIndicator();
|
||||
@@ -1076,6 +1080,8 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
|
||||
if (success) {
|
||||
p->SetAudioIOToken(token);
|
||||
mBusyProject = p;
|
||||
|
||||
StartScrollingIfPreferred();
|
||||
}
|
||||
else {
|
||||
if (shifted) {
|
||||
@@ -1263,6 +1269,14 @@ void ControlToolBar::UpdateStatusBar(AudacityProject *pProject)
|
||||
pProject->GetStatusBar()->SetStatusText(StateForStatusBar(), stateStatusBarField);
|
||||
}
|
||||
|
||||
void ControlToolBar::StartScrollingIfPreferred()
|
||||
{
|
||||
if (PlaybackPrefs::GetPinnedHeadPreference())
|
||||
StartScrolling();
|
||||
else
|
||||
StopScrolling();
|
||||
}
|
||||
|
||||
void ControlToolBar::StartScrolling()
|
||||
{
|
||||
using Mode = AudacityProject::PlaybackScroller::Mode;
|
||||
|
||||
@@ -107,6 +107,7 @@ class ControlToolBar final : public ToolBar {
|
||||
void UpdateStatusBar(AudacityProject *pProject);
|
||||
|
||||
// Starting and stopping of scrolling display
|
||||
void StartScrollingIfPreferred();
|
||||
void StartScrolling();
|
||||
void StopScrolling();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user