1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-03 17:39:25 +02:00

ScrubbingToolBar eats less idle time after commit 192530d

This commit is contained in:
Paul Licameli 2019-07-05 13:21:26 -04:00
parent dc88fe84d9
commit 8c59f66583
2 changed files with 9 additions and 7 deletions

View File

@ -219,9 +219,7 @@ void ScrubbingToolBar::OnButton(wxCommandEvent &event)
void ScrubbingToolBar::EnableDisableButtons()
{
const auto scrubButton = mButtons[STBScrubID];
scrubButton->SetEnabled(true);
const auto seekButton = mButtons[STBSeekID];
seekButton->SetEnabled(true);
AudacityProject *p = &mProject;

View File

@ -575,9 +575,11 @@ bool AButton::WasControlDown()
void AButton::Enable()
{
wxWindow::Enable(true);
mEnabled = true;
Refresh(false);
bool changed = wxWindow::Enable(true);
if ( !mEnabled ) {
mEnabled = true;
Refresh(false);
}
}
void AButton::Disable()
@ -589,10 +591,12 @@ void AButton::Disable()
#ifndef __WXMSW__
wxWindow::Enable(false);
#endif
mEnabled = false;
if (GetCapture()==this)
ReleaseMouse();
Refresh(false);
if ( mEnabled ) {
mEnabled = false;
Refresh(false);
}
}
void AButton::PushDown()