From f12aeb00d2b9e1835ccaf9b7e194818db25438a0 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 16 May 2023 13:33:57 +0100 Subject: [PATCH] Remove forced content tracking refresh in clear_options While the fix for #2557 likely isn't *the* fix (see #2582 for some context around that), it is a fix that works for now. As such, with the change, there was a double attempt to refresh the content tracking in the clearing of options in the OptionList, which shouldn't be necessary. This removes that. --- src/textual/widgets/_option_list.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/textual/widgets/_option_list.py b/src/textual/widgets/_option_list.py index 7d9af219b..5b4a39b48 100644 --- a/src/textual/widgets/_option_list.py +++ b/src/textual/widgets/_option_list.py @@ -627,7 +627,6 @@ class OptionList(ScrollView, can_focus=True): """ self._contents.clear() self._options.clear() - self._refresh_content_tracking(force=True) self.highlighted = None self._mouse_hovering_over = None self.virtual_size = Size(self.scrollable_content_region.width, 0)