From c44e64814cbe61aa9d77ed6a00c9e57f6e7a1727 Mon Sep 17 00:00:00 2001 From: nowrep Date: Fri, 27 Jul 2012 21:23:41 +0200 Subject: [PATCH] Properly fixed highlighting from d97ab52d8c --- src/lib/webview/searchtoolbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/webview/searchtoolbar.cpp b/src/lib/webview/searchtoolbar.cpp index 6db016859..d7829cc6f 100644 --- a/src/lib/webview/searchtoolbar.cpp +++ b/src/lib/webview/searchtoolbar.cpp @@ -116,6 +116,10 @@ void SearchToolBar::caseSensitivityChanged() void SearchToolBar::searchText(const QString &text) { WebView* view = p_QupZilla->weView(); + + // Clear highlighting on page + view->findText(QString(), QWebPage::HighlightAllOccurrences); + bool found = view->findText(text, m_findFlags); if (text.isEmpty()) { @@ -126,10 +130,6 @@ void SearchToolBar::searchText(const QString &text) m_findFlags = QWebPage::HighlightAllOccurrences; updateFindFlags(); view->findText(text, m_findFlags); - - if (!found) { - view->findText(QString(), QWebPage::HighlightAllOccurrences); - } } else { view->findText(QString(), QWebPage::HighlightAllOccurrences);