1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-09 06:06:24 +01:00

Remove double-click handling for scrolling play/record

This commit is contained in:
Paul Licameli
2016-05-29 15:58:47 -04:00
parent e39da0c42b
commit ff95bf1490
4 changed files with 11 additions and 57 deletions

View File

@@ -749,24 +749,17 @@ void ControlToolBar::OnKeyEvent(wxKeyEvent & event)
void ControlToolBar::OnPlay(wxCommandEvent & WXUNUSED(evt))
{
auto doubleClicked = mPlay->IsDoubleClicked();
mPlay->ClearDoubleClicked();
auto p = GetActiveProject();
if (doubleClicked)
StartScrolling();
else {
if (!CanStopAudioStream())
return;
if (!CanStopAudioStream())
return;
StopPlaying();
StopPlaying();
if (p) p->TP_DisplaySelection();
if (p) p->TP_DisplaySelection();
PlayDefault();
UpdateStatusBar(p);
}
PlayDefault();
UpdateStatusBar(p);
}
void ControlToolBar::OnStop(wxCommandEvent & WXUNUSED(evt))
@@ -856,14 +849,6 @@ void ControlToolBar::Pause()
void ControlToolBar::OnRecord(wxCommandEvent &evt)
{
auto doubleClicked = mRecord->IsDoubleClicked();
mRecord->ClearDoubleClicked();
if (doubleClicked) {
StartScrolling();
return;
}
if (gAudioIO->IsBusy()) {
if (!CanStopAudioStream() || 0 == gAudioIO->GetNumCaptureChannels())
mRecord->PopUp();

View File

@@ -476,22 +476,11 @@ void TranscriptionToolBar::OnPlaySpeed(wxCommandEvent & WXUNUSED(event))
{
auto button = mButtons[TTB_PlaySpeed];
auto doubleClicked = button->IsDoubleClicked();
button->ClearDoubleClicked();
if (doubleClicked) {
GetActiveProject()->GetControlToolBar()->StartScrolling();
// Pop up the button
SetButton(false, button);
}
else {
// Let control have precedence over shift
const bool cutPreview = mButtons[TTB_PlaySpeed]->WasControlDown();
const bool looped = !cutPreview &&
button->WasShiftDown();
PlayAtSpeed(looped, cutPreview);
}
// Let control have precedence over shift
const bool cutPreview = mButtons[TTB_PlaySpeed]->WasControlDown();
const bool looped = !cutPreview &&
button->WasShiftDown();
PlayAtSpeed(looped, cutPreview);
}
void TranscriptionToolBar::OnSpeedSlider(wxCommandEvent& WXUNUSED(event))