Fix #1784245 [last library highlight stops working when vacuuming the database](https://bugs.launchpad.net/calibre/+bug/1784245)

This commit is contained in:
Kovid Goyal 2018-07-31 15:56:34 +05:30
parent 1d892d9c0d
commit 9205f188b9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -321,9 +321,10 @@ class ChooseLibraryAction(InterfaceAction):
a.setWhatsThis(tooltip)
def library_changed(self, db):
self.prev_lname = self.last_lname
lname = self.stats.library_used(db)
self.last_lname = lname
if lname != self.last_lname:
self.prev_lname = self.last_lname
self.last_lname = lname
if len(lname) > 16:
lname = lname[:16] + u''
a = self.qaction