mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 09:16:23 +01:00
Fix layout state being saved incorrectly if calibre is killed without a proper shutdown
This commit is contained in:
parent
fff1892577
commit
604bae8a45
2 changed files with 4 additions and 1 deletions
|
|
@ -135,7 +135,8 @@ def start_gui(self, db):
|
|||
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 @@ def initialize(self, library_path, db, listener, actions, show_gui=True):
|
|||
self.keyboard.finalize()
|
||||
self.auto_adder = AutoAdder(gprefs['auto_add_path'], self)
|
||||
|
||||
self.save_layout_state()
|
||||
|
||||
# Collect cycles now
|
||||
gc.collect()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue