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:
parent
dc88fe84d9
commit
8c59f66583
@ -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;
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user