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()
{
mButtonIsDown = true;
this->Refresh(false);
if (!mButtonIsDown) {
mButtonIsDown = true;
this->Refresh(false);
}
}
void AButton::PopUp()
{
mButtonIsDown = false;
if (mButtonIsDown) {
mButtonIsDown = false;
this->Refresh(false);
}
if (GetCapture()==this)
ReleaseMouse();
this->Refresh(false);
}
void AButton::Click()