Fix splits layout options serialization

Fixes #10124
This commit is contained in:
Kovid Goyal 2026-06-10 07:34:47 +05:30
parent c126e227d3
commit 238573e799
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 3 deletions

View file

@ -178,6 +178,8 @@ Detailed list of changes
- macOS: Show a key symbol on the active tab if the macOS Secure Input feature is enabled
- Fix regression that broke unserialization of splits layout in previous release (:iss:`10124`)
0.47.2 [2026-06-07]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -564,10 +564,13 @@ def __init__(self, data: dict[str, str]):
self.default_axis_is_horizontal = None
else:
self.default_axis_is_horizontal = q == 'horizontal'
self.equalize_on_close = to_bool(data.get('equalize_on_close', 'false'))
self.equalize_on_close = to_bool(data.get('equalize_on_window_close', 'n'))
def serialized(self) -> dict[str, Any]:
return {'default_axis_is_horizontal': self.default_axis_is_horizontal, 'equalize_on_close': self.equalize_on_close}
def serialized(self) -> dict[str, str]:
return {
'split_axis': 'auto' if self.default_axis_is_horizontal is None else ('horizontal' if self.default_axis_is_horizontal else 'vertical'),
'equalize_on_window_close': 'y' if self.equalize_on_close else 'n',
}
class Splits(Layout):