mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-22 19:50:44 +00:00
ENH:Reduce the number of page faults in AMS
Change-Id: I4bfb048ec62c35b515eecbb70c175fa0975d7f92 (cherry picked from commit 791be195475bd834c937fb63341713529e4f41b8)
This commit is contained in:
@@ -77,15 +77,19 @@ bool Button::SetFont(const wxFont& font)
|
||||
|
||||
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
|
||||
this->active_icon = ScalableBitmap(this, icon.ToStdString(), this->active_icon.px_cnt());
|
||||
if (!tmpBitmap.bmp().IsSameAs(tmpBitmap.bmp())) {
|
||||
this->active_icon = tmpBitmap;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->active_icon = ScalableBitmap();
|
||||
Refresh();
|
||||
}
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void Button::SetInactiveIcon(const wxString &icon)
|
||||
|
||||
Reference in New Issue
Block a user