From d44c64e440e8d551d528eeafef97407c77cd420a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 4 Jun 2010 02:38:35 +0200 Subject: This should fix the Ctrl+w bug. Anyway, it really doesn't solve it: there is a corner case where the trick implemented doesn't work. We'll see if someone can fix also that.. BUG:233937 --- src/mainview.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index 0b17ef2a..166c1a1b 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -413,9 +413,11 @@ void MainView::windowCloseRequested() void MainView::closeOtherTabs(int index) { - if (-1 == index) + if (index < 0) + index = currentIndex(); + if (index < 0 || index >= count()) return; - + for (int i = count() - 1; i > index; --i) { closeTab(i); @@ -430,7 +432,6 @@ void MainView::closeOtherTabs(int index) } -// When index is -1 index chooses the current tab void MainView::cloneTab(int index) { if (index < 0) -- cgit v1.2.1