mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Only refresh on deselect if something was deselected
This commit is contained in:
@@ -302,11 +302,11 @@ 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()
|
||||
return self
|
||||
|
||||
|
||||
Reference in New Issue
Block a user