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,12 +302,12 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
Args:
|
Args:
|
||||||
selection: The selection to mark as selected.
|
selection: The selection to mark as selected.
|
||||||
"""
|
"""
|
||||||
self._deselect(
|
if self._deselect(
|
||||||
selection.value
|
selection.value
|
||||||
if isinstance(selection, Selection)
|
if isinstance(selection, Selection)
|
||||||
else cast(SelectionType, selection)
|
else cast(SelectionType, selection)
|
||||||
)
|
):
|
||||||
self.refresh()
|
self.refresh()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def deselect_all(self) -> Self:
|
def deselect_all(self) -> Self:
|
||||||
|
|||||||
Reference in New Issue
Block a user