From d3124f6e5bee33b542e759fedd3792747122241b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 20 Apr 2018 19:46:50 +0300 Subject: fix for closing all another tabs but the current one --- src/core/stdmsg/src/tabs.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index 863c70e67e..1e240e1f44 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -639,13 +639,14 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) break; case ID_CLOSEOTHER: - int tabCount = m_tab.GetCount() - 1; - if (tabCount > 0) { - for (tabCount; tabCount >= 0; tabCount--) { + int tabCount = m_tab.GetCount(); + if (tabCount > 1) { + while (tabCount--) { if (tabCount == i) continue; - m_tab.RemovePage(tabCount); + if (pDlg = (CMsgDialog*)m_tab.GetNthPage(tabCount)) + pDlg->CloseTab(); } m_tab.ActivatePage(0); } -- cgit v1.2.3