Merge pull request #2926 from merriam/merriam-hierarchy

Merriam hierarchy
This commit is contained in:
dessant 2015-01-28 00:51:46 +02:00
commit 21af2a4e6a
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ class ShowcaseApp(App):
show_sourcecode = BooleanProperty(False)
sourcecode = StringProperty()
screen_names = ListProperty([])
higherarchy = ListProperty([])
hierarchy = ListProperty([])
def build(self):
self.title = 'hello world'
@ -75,8 +75,8 @@ class ShowcaseApp(App):
self.root.ids.sm.switch_to(self.load_screen(idx), direction='left')
self.update_sourcecode()
def go_higherarchy_previous(self):
ahr = self.higherarchy
def go_hierarchy_previous(self):
ahr = self.hierarchy
if len(ahr) == 1:
return
if ahr:

View File

@ -52,7 +52,7 @@ BoxLayout:
ActionPrevious:
with_previous: (False if sm.current_screen.name == 'button' else True) if sm.current_screen else False
title: 'Showcase' + ('' if not app.current_title else ' - {}'.format(app.current_title))
on_release: app.go_higherarchy_previous()
on_release: app.go_hierarchy_previous()
ActionSpinner:
id: spnr
@ -98,4 +98,4 @@ BoxLayout:
on_current_screen:
spnr.text = args[1].name
idx = app.screen_names.index(args[1].name)
if idx > -1: app.higherarchy.append(idx)
if idx > -1: app.hierarchy.append(idx)