mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-07-26 20:02:11 +08:00
[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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user