From 10865fbcb55fc8c8fd928b05c56f69521460e7fc Mon Sep 17 00:00:00 2001 From: Fabio D'Urso Date: Thu, 12 Jul 2012 21:44:17 +0200 Subject: [PATCH] Keep m_changed set to true if it was already true when changing search direction Otherwise, next/previous buttons don't work after ESC is pressed in PageView --- ui/searchlineedit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/searchlineedit.cpp b/ui/searchlineedit.cpp index 787582158..e26ef7d0f 100644 --- a/ui/searchlineedit.cpp +++ b/ui/searchlineedit.cpp @@ -65,7 +65,9 @@ void SearchLineEdit::setSearchType( Okular::Document::SearchType type ) return; m_searchType = type; - m_changed = ( m_searchType != Okular::Document::NextMatch && m_searchType != Okular::Document::PreviousMatch ); + + if ( !m_changed ) + m_changed = ( m_searchType != Okular::Document::NextMatch && m_searchType != Okular::Document::PreviousMatch ); } void SearchLineEdit::setSearchId( int id )