diff --git a/src/textual/widgets/_selection_list.py b/src/textual/widgets/_selection_list.py index 8e3ba4688..17852b6dc 100644 --- a/src/textual/widgets/_selection_list.py +++ b/src/textual/widgets/_selection_list.py @@ -302,12 +302,12 @@ class SelectionList(Generic[SelectionType], OptionList): Args: selection: The selection to mark as selected. """ - self._deselect( + if self._deselect( selection.value if isinstance(selection, Selection) else cast(SelectionType, selection) - ) - self.refresh() + ): + self.refresh() return self def deselect_all(self) -> Self: