summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-04 02:38:35 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-04 02:38:35 +0200
commitd44c64e440e8d551d528eeafef97407c77cd420a (patch)
treedc1a6e0cb478a027dc8e3ceb2d156154436bb089 /src/mainview.cpp
parenti18n fixes (diff)
downloadrekonq-d44c64e440e8d551d528eeafef97407c77cd420a.tar.xz
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
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp7
1 files changed, 4 insertions, 3 deletions
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)