Always save last window session.
len(objreg.window_registry) can actually lag behind because single-shot QTimers are used to remove the windows from the registry - but actually it doesn't even matter if this is the last window or not. We just always save to SessionManager._last_window_session, and it gets used in SessionManager.save. Fixes #650.
This commit is contained in:
parent
ae512f451e
commit
e62ba57291
@ -416,8 +416,7 @@ class MainWindow(QWidget):
|
|||||||
e.ignore()
|
e.ignore()
|
||||||
return
|
return
|
||||||
e.accept()
|
e.accept()
|
||||||
if len(objreg.window_registry) == 1:
|
objreg.get('session-manager').save_last_window_session()
|
||||||
objreg.get('session-manager').save_last_window_session()
|
|
||||||
self._save_geometry()
|
self._save_geometry()
|
||||||
log.destroy.debug("Closing window {}".format(self.win_id))
|
log.destroy.debug("Closing window {}".format(self.win_id))
|
||||||
self._tabbed_browser.shutdown()
|
self._tabbed_browser.shutdown()
|
||||||
|
Loading…
Reference in New Issue
Block a user