Fix temporarily incorrect value in prefs['current_path'] while changing libraries.

This commit is contained in:
Charles Haley 2012-06-12 09:43:08 +02:00
parent a568dfc74a
commit 0cc0ee9044

View file

@ -532,6 +532,7 @@ def library_moved(self, newloc, copy_structure=False, call_close=True,
if self.content_server is not None:
self.content_server.set_database(db)
self.library_path = newloc
prefs['library_path'] = self.library_path
self.book_on_device(None, reset=True)
db.set_book_on_device_func(self.book_on_device)
self.library_view.set_database(db)
@ -541,7 +542,6 @@ def library_moved(self, newloc, copy_structure=False, call_close=True,
self.search.clear()
self.saved_search.clear()
self.book_details.reset_info()
prefs['library_path'] = self.library_path
#self.library_view.model().count_changed()
db = self.library_view.model().db
self.iactions['Choose Library'].count_changed(db.count())