mirror of https://github.com/kivy/kivy.git
TabbedPanel: fix first tab selection
This commit is contained in:
parent
c35dca3656
commit
a6b5683b4c
|
@ -15,17 +15,14 @@ Builder.load_string("""
|
|||
<Test>:
|
||||
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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue