Fix migration of tabs.persist_mode_on_change

This commit is contained in:
Florian Bruhin 2018-02-19 21:01:52 +01:00
parent 5d63dfb24c
commit 1409f4e564

View File

@ -222,10 +222,13 @@ class YamlConfig(QObject):
old = 'tabs.persist_mode_on_change'
new = 'tabs.mode_on_change'
if old in settings:
if settings[old]:
settings[new] = 'persist'
else:
settings[new] = 'normal'
settings[new] = {}
for scope, val in settings[old].items():
if val:
settings[new][scope] = 'persist'
else:
settings[new][scope] = 'normal'
del settings[old]
self._mark_changed()