mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix shutdown code
This commit is contained in:
parent
28f62fd4dd
commit
f7321f2c57
@ -522,7 +522,13 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, # {{{
|
|||||||
|
|
||||||
|
|
||||||
def shutdown(self, write_settings=True):
|
def shutdown(self, write_settings=True):
|
||||||
self.db.clean()
|
l = getattr(self, 'library_view', None)
|
||||||
|
if l:
|
||||||
|
l = getattr(l, 'model', None);
|
||||||
|
if l:
|
||||||
|
l = l().db
|
||||||
|
if l:
|
||||||
|
l.clean()
|
||||||
for action in self.iactions.values():
|
for action in self.iactions.values():
|
||||||
if not action.shutting_down():
|
if not action.shutting_down():
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user