fix wrong spaces and priority for session restore
This commit is contained in:
parent
c590a37043
commit
89e6ff6599
@ -211,16 +211,16 @@ def _load_session(name):
|
|||||||
"""
|
"""
|
||||||
state_config = objreg.get('state-config')
|
state_config = objreg.get('state-config')
|
||||||
session_manager = objreg.get('session-manager')
|
session_manager = objreg.get('session-manager')
|
||||||
if name is None:
|
if name is None and session_manager.exists('_autosave'):
|
||||||
|
name = '_autosave'
|
||||||
|
elif name is None:
|
||||||
try:
|
try:
|
||||||
name = state_config['general']['session']
|
name = state_config['general']['session']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# No session given as argument and none in the session file ->
|
# No session given as argument and none in the session file ->
|
||||||
# start without loading a session
|
# start without loading a session
|
||||||
if session_manager.exists('_autosave'):
|
|
||||||
name = '_autosave'
|
|
||||||
else:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
session_manager.load(name)
|
session_manager.load(name)
|
||||||
except sessions.SessionNotFoundError:
|
except sessions.SessionNotFoundError:
|
||||||
|
Loading…
Reference in New Issue
Block a user