From cf06dcb0650f603ae3d634634d81f9ec78d21937 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 21 Dec 2017 17:52:56 +0100 Subject: Edited documentation - Search highlighting is removed when you close the search box - Fixed PKGBUILD not working - PKGBUILD can now pick compiler and optimization --- src/forms/searchform.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/forms/searchform.cpp') diff --git a/src/forms/searchform.cpp b/src/forms/searchform.cpp index 0e5161f..c05c6b2 100644 --- a/src/forms/searchform.cpp +++ b/src/forms/searchform.cpp @@ -26,9 +26,11 @@ SearchForm::SearchForm(MainWindow *parentWindow, QWidget *parent) : // show/hide action QAction *toggleSearchBox = new QAction(this); toggleSearchBox->setShortcut(QKeySequence(QString::fromStdString(parentWindow->m_config->value("browser.shortcuts.toggleSearchBox").value()))); - connect(toggleSearchBox, &QAction::triggered, this, [this]() { + connect(toggleSearchBox, &QAction::triggered, this, [this, parentWindow]() { if(isVisible()) { setVisible(false); + // remove highlighting by passing an empty string + parentWindow->m_currentView->findText(""); } else { setVisible(true); setFocus(); -- cgit v1.2.1