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).

This commit is contained in:
Charles Haley 2011-08-14 08:55:50 +01:00
parent 664673eddc
commit 9d6ceaa2e6

View File

@ -228,11 +228,15 @@ class SearchBox2(QComboBox): # {{{
self.clear() self.clear()
else: else:
self.normalize_state() 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.setEditText(txt)
self.line_edit.end(False) self.line_edit.end(False)
if emit_changed: if emit_changed:
self.changed.emit() self.changed.emit()
self._do_search(store_in_history=store_in_history) self._do_search(store_in_history=store_in_history)
self.line_edit.completer().setCaseSensitivity(Qt.CaseInsensitive)
self.focus_to_library.emit() self.focus_to_library.emit()
finally: finally:
if not store_in_history: if not store_in_history: