LockButton: Deleted unnecessary call of UpdateDarkUI()
+ Added some smarter update on SetLock()
This commit is contained in:
parent
ab171441aa
commit
6b83ded669
1 changed files with 4 additions and 3 deletions
|
@ -587,9 +587,11 @@ void LockButton::OnButton(wxCommandEvent& event)
|
|||
|
||||
void LockButton::SetLock(bool lock)
|
||||
{
|
||||
if (m_is_pushed != lock) {
|
||||
m_is_pushed = lock;
|
||||
update_button_bitmaps();
|
||||
}
|
||||
}
|
||||
|
||||
void LockButton::msw_rescale()
|
||||
{
|
||||
|
@ -603,7 +605,6 @@ void LockButton::msw_rescale()
|
|||
|
||||
void LockButton::update_button_bitmaps()
|
||||
{
|
||||
Slic3r::GUI::wxGetApp().UpdateDarkUI(this);
|
||||
SetBitmap(m_is_pushed ? m_bmp_lock_closed.bmp() : m_bmp_lock_open.bmp());
|
||||
SetBitmapHover(m_is_pushed ? m_bmp_lock_closed_f.bmp() : m_bmp_lock_open_f.bmp());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue