From 9b81a93de57785051cdb30bd7100a6102dd344be Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 20 Mar 2023 19:07:29 +0300 Subject: SRMM: button displays the forecoming state, not the current one --- plugins/Scriver/src/msgdialog.cpp | 2 +- plugins/Scriver/src/msgutils.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/Scriver') diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index b5ab5506ea..c7e0edcb05 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -491,7 +491,7 @@ void CMsgDialog::onClick_ShowList(CCtrlButton *pButton) return; m_bNicklistEnabled = !m_bNicklistEnabled; - pButton->SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST2 : IDI_NICKLIST)); + UpdateFilterButton(); m_pLog->ScrollToBottom(); Resize(); } diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 7d659b85bd..4f7223c28d 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -534,7 +534,8 @@ void CMsgDialog::UpdateFilterButton() { CSuper::UpdateFilterButton(); - m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER2 : IDI_FILTER)); + m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER : IDI_FILTER2)); + m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST2 : IDI_NICKLIST)); } void CMsgDialog::UpdateNickList() @@ -558,8 +559,6 @@ void CMsgDialog::UpdateNickList() void CMsgDialog::UpdateOptions() { - m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST2 : IDI_NICKLIST)); - GetAvatar(); UpdateFilterButton(); -- cgit v1.2.3