]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Clear forward action popup menu before adding history actions
authorKai Uwe Broulik <kde@privat.broulik.de>
Tue, 28 Jan 2025 18:29:40 +0000 (19:29 +0100)
committerKai Uwe Broulik <kde@privat.broulik.de>
Tue, 28 Jan 2025 18:30:09 +0000 (19:30 +0100)
Otherwise the menu keeps growing and growing.
The back button had the clear call but here it was forgotten.

src/dolphinmainwindow.cpp

index 50c7f2e0e7951c89be9d6a0d8802d0f7d9a911e8..d9438ea091b5313be7eddf368c616afce2012e3e 100644 (file)
@@ -981,6 +981,7 @@ void DolphinMainWindow::slotAboutToShowForwardPopupMenu()
     const KUrlNavigator *urlNavigator = m_activeViewContainer->urlNavigatorInternalWithHistory();
     int entries = 0;
     QMenu *menu = m_forwardAction->popupMenu();
+    menu->clear();
     for (int i = urlNavigator->historyIndex() - 1; i >= 0 && entries < MaxNumberOfNavigationentries; --i, ++entries) {
         QAction *action = urlNavigatorHistoryAction(urlNavigator, i, menu);
         menu->addAction(action);