mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix layout state being saved incorrectly if calibre is killed without a proper shutdown
This commit is contained in:
parent
fff1892577
commit
604bae8a45
@ -135,7 +135,8 @@ class GuiRunner(QObject):
|
||||
main = Main(self.opts, gui_debug=self.gui_debug)
|
||||
if self.splash_screen is not None:
|
||||
self.splash_screen.showMessage(_('Initializing user interface...'))
|
||||
main.initialize(self.library_path, db, self.listener, self.actions)
|
||||
with gprefs: # Only write gui.json after initialization is complete
|
||||
main.initialize(self.library_path, db, self.listener, self.actions)
|
||||
if self.splash_screen is not None:
|
||||
self.splash_screen.finish(main)
|
||||
if DEBUG:
|
||||
|
@ -367,6 +367,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
||||
self.keyboard.finalize()
|
||||
self.auto_adder = AutoAdder(gprefs['auto_add_path'], self)
|
||||
|
||||
self.save_layout_state()
|
||||
|
||||
# Collect cycles now
|
||||
gc.collect()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user