]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Fixed a bug in the "Recently Closed Tabs" menu that would cause it to show more recen...
[dolphin.git] / src / dolphinmainwindow.cpp
index 78e48991557aeff3c9581abc421b59ac570f6f26..fc68191b1c42a187e08a6d8e06ea40902ecab67c 100644 (file)
@@ -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);
 }