┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorShaun Reich <[email protected]>2009-03-01 02:27:35 +0000
committerShaun Reich <[email protected]>2009-03-01 02:27:35 +0000
commitdd89f93181f136c485b42de240feccd5b24e9579 (patch)
tree8a6f8527e400bde4c82f6593a790518608dfa766 /src/dolphinmainwindow.cpp
parent78e9cc506f90eb862f032154199331b5e5e6dffb (diff)
Fixed a bug in the "Recently Closed Tabs" menu that would cause it to show more recent tabs at the bottom.
The most recent tab will now always be shown right below the separator, which is right below the "Clear Recently Closed Tabs" action. svn path=/trunk/KDE/kdebase/apps/; revision=933487
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 78e489915..fc68191b1 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1355,11 +1355,12 @@ void DolphinMainWindow::rememberClosedTab(int index)
action->setData(QVariant::fromValue(closedTab));
action->setIcon(KIcon(iconName));
- //Add our action at the first element, but only do that if it isn't empty, else just append
- if (tabsMenu->actions().isEmpty()) {
+ //Add our action after the separator and the clear list actions
+ if (tabsMenu->actions().size() == 2) {
tabsMenu->addAction(action);
} else {
- tabsMenu->insertAction(tabsMenu->actions().first() + 2, action);
+
+ tabsMenu->insertAction(tabsMenu->actions().at(2), action);
}
actionCollection()->action("closed_tabs")->setEnabled(true);
}