summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-20 19:46:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-20 19:46:50 +0300
commitd3124f6e5bee33b542e759fedd3792747122241b (patch)
tree35c461aaac3df8c09d5465dc08663fb539e5ca21 /src/core/stdmsg
parent0cd102cceca19d0a0d12ae507c7b8e54d88adca9 (diff)
fix for closing all another tabs but the current one
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/tabs.cpp9
1 files changed, 5 insertions, 4 deletions
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);
}