Removed lingering call to deleted touch_selection() in master detail example. Removed unused blocks that would have selected children in composite items too aggressively, if conditional had worked.

This commit is contained in:
geojeff 2012-10-31 18:27:54 -05:00
parent b4243b21fe
commit 91218bcfe1
2 changed files with 1 additions and 16 deletions

View File

@ -39,13 +39,8 @@ class MasterDetailView(GridLayout):
fruit_name=dict_adapter.selection[0].text,
size_hint=(.7, 1.0))
self.add_widget(detail_view)
dict_adapter.bind(on_selection_change=detail_view.fruit_changed)
# Force triggering of on_selection_change() for the DetailView, for
# correct initial display.
dict_adapter.touch_selection()
self.add_widget(detail_view)
if __name__ == '__main__':

View File

@ -325,11 +325,6 @@ class ListAdapter(Adapter, EventDispatcher):
#if hasattr(sibling, 'select'):
#sibling.select()
# child selection
for child in view.children:
if hasattr(child, 'select'):
child.select()
if self.propagate_selection_to_data:
data_item = self.get_data_item(view.index)
self.select_data_item(data_item)
@ -366,11 +361,6 @@ class ListAdapter(Adapter, EventDispatcher):
#if hasattr(sibling, 'deselect'):
#sibling.deselect()
# child deselection
for child in view.children:
if hasattr(child, 'deselect'):
child.deselect()
if self.propagate_selection_to_data:
item = self.get_data_item(view.index)
self.deselect_data_item(item)