From 2724258397e05d55b34920c80f12956d43aeb274 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Jan 2010 10:40:09 -0700 Subject: [PATCH 1/2] Fix #4400 (Extra space in series edited on main screen) --- src/calibre/gui2/library.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/library.py b/src/calibre/gui2/library.py index 6648a5189c..8c43e25a42 100644 --- a/src/calibre/gui2/library.py +++ b/src/calibre/gui2/library.py @@ -650,7 +650,7 @@ class BooksModel(QAbstractTableModel): match = pat.search(val) if match is not None: self.db.set_series_index(id, float(match.group(1))) - val = pat.sub('', val) + val = pat.sub('', val).strip() elif val: ni = self.db.get_next_series_num_for(val) if ni != 1: From 0450dcf435f3c33a21ea3461b22868a3ace89f7f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Jan 2010 11:31:48 -0700 Subject: [PATCH 2/2] Fix bug that prevented the changing of case of authors/series and publishers --- src/calibre/gui2/widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py index cce594d557..e276d2dcb2 100644 --- a/src/calibre/gui2/widgets.py +++ b/src/calibre/gui2/widgets.py @@ -624,12 +624,13 @@ class EnComboBox(QComboBox): def __init__(self, *args): QComboBox.__init__(self, *args) self.setLineEdit(EnLineEdit(self)) + self.setAutoCompletionCaseSensitivity(Qt.CaseSensitive) def text(self): return unicode(self.currentText()) def setText(self, text): - idx = self.findText(text, Qt.MatchFixedString) + idx = self.findText(text, Qt.MatchFixedString|Qt.MatchCaseSensitive) if idx == -1: self.insertItem(0, text) idx = 0