mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #840448 (Various bugs for past isbn button)
This commit is contained in:
parent
60d7e4ff2d
commit
0bef23bc6f
@ -1227,7 +1227,9 @@ class IdentifiersEdit(QLineEdit): # {{{
|
||||
val[k] = v
|
||||
ids = sorted(val.iteritems(), key=keygen)
|
||||
txt = ', '.join(['%s:%s'%(k.lower(), v) for k, v in ids])
|
||||
self.setText(txt.strip())
|
||||
# Use clear + insert instead of setText so that undo works
|
||||
self.clear()
|
||||
self.insert(txt.strip())
|
||||
self.setCursorPosition(0)
|
||||
return property(fget=fget, fset=fset)
|
||||
|
||||
@ -1319,7 +1321,7 @@ class ISBNDialog(QDialog) : # {{{
|
||||
self.line_edit.setStyleSheet('QLineEdit { background-color: %s }'%col)
|
||||
|
||||
def text(self):
|
||||
return unicode(self.line_edit.text())
|
||||
return check_isbn(unicode(self.line_edit.text()))
|
||||
|
||||
# }}}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user