1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 00:20:06 +02:00

Avoid some needless repaints of AButton

This commit is contained in:
Paul Licameli 2018-02-07 03:13:33 -05:00
parent 44bf938948
commit de568fc111

View File

@ -516,18 +516,22 @@ void AButton::Disable()
void AButton::PushDown() void AButton::PushDown()
{ {
mButtonIsDown = true; if (!mButtonIsDown) {
this->Refresh(false); mButtonIsDown = true;
this->Refresh(false);
}
} }
void AButton::PopUp() void AButton::PopUp()
{ {
mButtonIsDown = false; if (mButtonIsDown) {
mButtonIsDown = false;
this->Refresh(false);
}
if (GetCapture()==this) if (GetCapture()==this)
ReleaseMouse(); ReleaseMouse();
this->Refresh(false);
} }
void AButton::Click() void AButton::Click()