From a6b5683b4c312f3b496d4ed173798b09e875ded9 Mon Sep 17 00:00:00 2001 From: Qua-non Date: Sun, 21 Oct 2012 19:22:34 +0530 Subject: [PATCH] TabbedPanel: fix first tab selection --- examples/widgets/tabbedpanel.py | 5 +---- kivy/uix/tabbedpanel.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/widgets/tabbedpanel.py b/examples/widgets/tabbedpanel.py index 67eaea72b..832d8de4c 100644 --- a/examples/widgets/tabbedpanel.py +++ b/examples/widgets/tabbedpanel.py @@ -15,17 +15,14 @@ Builder.load_string(""" : size_hint: .5, .5 pos_hint: {'center_x': .5, 'center_y': .5} - #do_default_tab: False - default_tab: tab2 + do_default_tab: False TabbedPanelItem: - id: first_tab text: 'first tab' Label: id: set1_content text: 'First tab content area' TabbedPanelItem: - id: tab2 text: 'tab2' BoxLayout: Label: diff --git a/kivy/uix/tabbedpanel.py b/kivy/uix/tabbedpanel.py index 7dd6b2fb1..497b08e74 100644 --- a/kivy/uix/tabbedpanel.py +++ b/kivy/uix/tabbedpanel.py @@ -440,7 +440,7 @@ class TabbedPanel(GridLayout): if dft in self.tab_list: self._default_tab = None self.remove_widget(dft) - self._switch_to_first_tab + self._switch_to_first_tab() def _switch_to_first_tab(self, *l): ltl = len(self.tab_list) - 1