diff options
author | George Hazan <george.hazan@gmail.com> | 2024-11-09 17:11:38 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-11-09 17:11:38 +0300 |
commit | 8f00b03d2fb4bd673c34747674ddebefa6cd0eaf (patch) | |
tree | 76fb3dfd226a68bd686fa2f0e7b115aad66ed4cd | |
parent | 08e85dcd1ed4b48d73f02e1ed8e805dea30197b2 (diff) |
fixes #4781 (tabSRMM: Clear formatting hotkey doesn't work)
-rw-r--r-- | src/mir_app/src/srmm_toolbar.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index bddeef51d4..0cf41733ea 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -221,16 +221,23 @@ MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, int idFrom, HWND hwnd /////////////////////////////////////////////////////////////////////////////////////////
+static void disablePush(CCtrlButton &btn)
+{
+ if (btn.IsPushed()) {
+ btn.Push(false);
+ btn.Click();
+ }
+}
+
void CSrmmBaseDialog::ProcessToolbarHotkey(INT_PTR iButtonFrom)
{
switch (iButtonFrom) {
case SRMM_HK_CLEAR:
- m_btnBold.Push(false); m_btnBold.Click();
- m_btnItalic.Push(false); m_btnItalic.Click();
- m_btnUnderline.Push(false); m_btnUnderline.Click();
-
- m_btnColor.Push(false); m_btnColor.Click();
- m_btnBkColor.Push(false); m_btnBkColor.Click();
+ disablePush(m_btnBold);
+ disablePush(m_btnItalic);
+ disablePush(m_btnUnderline);
+ disablePush(m_btnColor);
+ disablePush(m_btnBkColor);
break;
case SRMM_HK_BOLD:
|