From 596456886db5df48599f62210500e0bbfa9d7da7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 12 Mar 2017 23:04:27 +0300 Subject: - fixes #742 (closing groupchat tab crashes Miranda); - the bForce parameter of CSrmmBaseDialog::CloseTab considered useless --- plugins/TabSRMM/src/chat_window.cpp | 6 +++--- plugins/TabSRMM/src/msgs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index 9eade66075..b78ef9461e 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -1948,7 +1948,7 @@ void CChatRoomDlg::AddLog() CSrmmBaseDialog::AddLog(); } -void CChatRoomDlg::CloseTab(bool bForced) +void CChatRoomDlg::CloseTab() { int iTabs = TabCtrl_GetItemCount(m_hwndParent); if (iTabs == 1 && CMimAPI::m_shutDown == 0) { @@ -1963,7 +1963,7 @@ void CChatRoomDlg::CloseTab(bool bForced) // the previously open tab. // normally, this tab has the same index after the deletion of the formerly active tab // unless, of course, we closed the last (rightmost) tab. - if (!m_pContainer->bDontSmartClose && iTabs > 1 && !bForced) { + if (!m_pContainer->bDontSmartClose && iTabs > 1) { if (i == iTabs - 1) i--; else @@ -2921,7 +2921,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) } _dlgReturn(m_hwnd, TRUE); } - CloseTab(true); + CloseTab(); return 0; case DM_SAVESIZE: diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index a88344eb34..a37b4d55a8 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -499,7 +499,7 @@ public: virtual int Resizer(UTILRESIZECONTROL *urc) override; virtual void AddLog() override; - virtual void CloseTab(bool bForced = false) override; + virtual void CloseTab() override; virtual void RedrawLog() override; virtual void ScrollToBottom() override; virtual void ShowFilterMenu() override; -- cgit v1.2.3