[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 <haibin.wen3@gmail.com>
This commit is contained in:
David
2026-04-14 16:56:39 -04:00
committed by GitHub
parent c7efc009a4
commit 6102aedf05
+4 -1
View File
@@ -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)