From ea2f2e885499a9e8ac71b34e893680764e70733c Mon Sep 17 00:00:00 2001 From: Tvangeste Date: Thu, 17 Jan 2013 19:38:49 +0100 Subject: [PATCH] Revert "Remove rather useless context menu to add title to history." This reverts commit c03b3461140df2b24e01e9203325b723cbe0fd6f. The menu item is not completely useless, it useful when the automatic history gathering is disabled and this menu could be used to add items to the history manually. --- articleview.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/articleview.cc b/articleview.cc index f407705f..9764e2a2 100644 --- a/articleview.cc +++ b/articleview.cc @@ -1113,6 +1113,14 @@ void ArticleView::contextMenuRequested( QPoint const & pos ) if ( selectedText.size() ) menu.addAction( ui.definition->pageAction( QWebPage::Copy ) ); + if( menu.isEmpty() ) + { + addHeaderToHistoryAction = new QAction( tr( "&Add \"%1\" to history" ). + arg( ui.definition->title() ), + &menu ); + menu.addAction( addHeaderToHistoryAction ); + } + map< QAction *, QString > tableOfContents; // Add table of contents