mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-09 06:06:24 +01:00
Play buttons can detect double clicks (but don't do anything special yet)
This commit is contained in:
@@ -738,6 +738,9 @@ void ControlToolBar::OnKeyEvent(wxKeyEvent & event)
|
||||
|
||||
void ControlToolBar::OnPlay(wxCommandEvent & WXUNUSED(evt))
|
||||
{
|
||||
auto doubleClicked = mPlay->IsDoubleClicked();
|
||||
mPlay->ClearDoubleClicked();
|
||||
|
||||
if (!CanStopAudioStream())
|
||||
return;
|
||||
|
||||
|
||||
@@ -474,10 +474,15 @@ void TranscriptionToolBar::PlayAtSpeed(bool looped, bool cutPreview)
|
||||
// Come here from button clicks only
|
||||
void TranscriptionToolBar::OnPlaySpeed(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
auto button = mButtons[TTB_PlaySpeed];
|
||||
|
||||
auto doubleClicked = button->IsDoubleClicked();
|
||||
button->ClearDoubleClicked();
|
||||
|
||||
// Let control have precedence over shift
|
||||
const bool cutPreview = mButtons[TTB_PlaySpeed]->WasControlDown();
|
||||
const bool looped = !cutPreview &&
|
||||
mButtons[TTB_PlaySpeed]->WasShiftDown();
|
||||
button->WasShiftDown();
|
||||
PlayAtSpeed(looped, cutPreview);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user