File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,16 @@ def go_screen(self, idx):
73
73
self .root .ids .sm .switch_to (self .load_screen (idx ), direction = 'left' )
74
74
self .update_sourcecode ()
75
75
76
+ def go_higherarchy_previous (self ):
77
+ ahr = self .higherarchy
78
+ if len (ahr ) == 1 :
79
+ return
80
+ if ahr :
81
+ ahr .pop ()
82
+ if ahr :\
83
+ idx = ahr .pop ();\
84
+ self .go_screen (idx )
85
+
76
86
def load_screen (self , index ):
77
87
if index in self .screens :
78
88
return self .screens [index ]
Original file line number Diff line number Diff line change @@ -52,11 +52,7 @@ BoxLayout:
52
52
ActionPrevious:
53
53
with_previous: (False if sm.current_screen.name == ' button' else True ) if sm.current_screen else False
54
54
title: ' Showcase' + (' ' if not app.current_title else ' - {} ' .format(app.current_title))
55
- on_release:
56
- if app.higherarchy: app.higherarchy.pop()
57
- if app.higherarchy:\
58
- idx = app.higherarchy.pop();\
59
- app.go_screen(idx)
55
+ on_release: app.go_higherarchy_previous()
60
56
61
57
ActionSpinner:
62
58
id : spnr
You can’t perform that action at this time.
0 commit comments