FIX:fixed button not refreshing (page faults)

Change-Id: Id546112398dd2037fe839133bdd3669ed8281226
(cherry picked from commit 542aa02acde720ff73924448b27946ba69b49c73)
This commit is contained in:
tao wang 2024-10-09 09:56:19 +08:00 committed by Noisyfox
parent 7a197a3d8d
commit 38e6589bcb

View file

@ -80,7 +80,7 @@ void Button::SetIcon(const wxString& icon)
auto tmpBitmap = ScalableBitmap(this, icon.ToStdString(), this->active_icon.px_cnt());
if (!icon.IsEmpty()) {
//BBS set button icon default size to 20
if (!tmpBitmap.bmp().IsSameAs(tmpBitmap.bmp())) {
if (!tmpBitmap.bmp().IsSameAs(this->active_icon.bmp())) {
this->active_icon = tmpBitmap;
Refresh();
}