mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1923061 [ebook-viewer: Unchecking "restore open panels" resets panel locations on restart](https://bugs.launchpad.net/calibre/+bug/1923061)
This commit is contained in:
parent
80364863a9
commit
f772957cd7
@ -685,9 +685,13 @@ class EbookViewer(MainWindow):
|
||||
QApplication.instance().safe_restore_geometry(self, geom)
|
||||
else:
|
||||
QApplication.instance().ensure_window_on_screen(self)
|
||||
if state and get_session_pref('restore_docks', True):
|
||||
if state:
|
||||
self.restoreState(state, self.MAIN_WINDOW_STATE_VERSION)
|
||||
self.inspector_dock.setVisible(False)
|
||||
if not get_session_pref('restore_docks', True):
|
||||
for dock_def in self.dock_defs.values():
|
||||
d = getattr(self, '{}_dock'.format(dock_def.name.partition('-')[0]))
|
||||
d.setVisible(False)
|
||||
|
||||
def quit(self):
|
||||
self.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user