mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 15:35:56 +08:00
LockButton: Deleted unnecessary call of UpdateDarkUI()
+ Added some smarter update on SetLock()
This commit is contained in:
parent
ab171441aa
commit
6b83ded669
@ -587,9 +587,11 @@ void LockButton::OnButton(wxCommandEvent& event)
|
|||||||
|
|
||||||
void LockButton::SetLock(bool lock)
|
void LockButton::SetLock(bool lock)
|
||||||
{
|
{
|
||||||
|
if (m_is_pushed != lock) {
|
||||||
m_is_pushed = lock;
|
m_is_pushed = lock;
|
||||||
update_button_bitmaps();
|
update_button_bitmaps();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LockButton::msw_rescale()
|
void LockButton::msw_rescale()
|
||||||
{
|
{
|
||||||
@ -603,7 +605,6 @@ void LockButton::msw_rescale()
|
|||||||
|
|
||||||
void LockButton::update_button_bitmaps()
|
void LockButton::update_button_bitmaps()
|
||||||
{
|
{
|
||||||
Slic3r::GUI::wxGetApp().UpdateDarkUI(this);
|
|
||||||
SetBitmap(m_is_pushed ? m_bmp_lock_closed.bmp() : m_bmp_lock_open.bmp());
|
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());
|
SetBitmapHover(m_is_pushed ? m_bmp_lock_closed_f.bmp() : m_bmp_lock_open_f.bmp());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user