From 6102aedf05abaa30d92dcdf84e85df4f368ae66e Mon Sep 17 00:00:00 2001 From: David <49467229+TheSecurityDev@users.noreply.github.com> Date: Tue, 14 Apr 2026 16:56:39 -0400 Subject: [PATCH] [TIZI/TICI] ui: fix unintended selection while scrolling in TreeOptionDialog (#1763) * fix: enable touch validation for visible items in TreeOptionDialog during scrolling * rebuild scroller and call add_widget instead --------- Co-authored-by: Jason Wen --- system/ui/sunnypilot/widgets/tree_dialog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/ui/sunnypilot/widgets/tree_dialog.py b/system/ui/sunnypilot/widgets/tree_dialog.py index c34db092e..69233b803 100644 --- a/system/ui/sunnypilot/widgets/tree_dialog.py +++ b/system/ui/sunnypilot/widgets/tree_dialog.py @@ -198,7 +198,10 @@ class TreeOptionDialog(MultiOptionDialog): self.option_buttons = self.visible_items self.options = [item.text for item in self.visible_items] - self.scroller._items = self.visible_items + # Rebuild scroller items to ensure proper setup of touch callbacks + self.scroller._items.clear() + for item in self.option_buttons: + self.scroller.add_widget(item) if reset_scroll: self.scroller.scroll_panel.set_offset(0)