diff --git a/CHANGELOG.md b/CHANGELOG.md index 7032ca1ee4..6306b7d283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fixed duplicated key displays in the help panel https://github.com/Textualize/textual/issues/5037 +- Fixed crash when removing then adding panes to `TabbedContent` https://github.com/Textualize/textual/issues/5215 ## [0.85.2] - 2024-11-02 diff --git a/src/textual/widgets/_tabbed_content.py b/src/textual/widgets/_tabbed_content.py index 5cec257265..6b22492c19 100644 --- a/src/textual/widgets/_tabbed_content.py +++ b/src/textual/widgets/_tabbed_content.py @@ -333,6 +333,7 @@ def __init__( self._tab_content: list[Widget] = [] self._initial = initial self._cumulative_tab_count = 0 + """Tracks the total number of tabs added to ensure unique IDs if tabs are removed""" super().__init__(name=name, id=id, classes=classes, disabled=disabled) @property