From 9d6ceaa2e67b39878442ab0dd2a226a1375fa428 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 14 Aug 2011 08:55:50 +0100 Subject: [PATCH] Preserve case of tag browser search strings so that item matching (green plus etc) works. A possible different fix would be to do case-insensitive matching in the tag browser, but that might break special searches that depend on case (e.g. regexps). --- src/calibre/gui2/search_box.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/search_box.py b/src/calibre/gui2/search_box.py index 8772570811..65c4622891 100644 --- a/src/calibre/gui2/search_box.py +++ b/src/calibre/gui2/search_box.py @@ -228,11 +228,15 @@ class SearchBox2(QComboBox): # {{{ self.clear() else: self.normalize_state() + # must turn off case sensitivity here so that tag browser strings + # are not case-insensitively replaced from history + self.line_edit.completer().setCaseSensitivity(Qt.CaseSensitive) self.setEditText(txt) self.line_edit.end(False) if emit_changed: self.changed.emit() self._do_search(store_in_history=store_in_history) + self.line_edit.completer().setCaseSensitivity(Qt.CaseInsensitive) self.focus_to_library.emit() finally: if not store_in_history: