bugfix
This commit is contained in:
parent
602bf6baca
commit
63c9141d0b
@ -109,8 +109,9 @@ class TwoSides(WidgetReady, BoxLayout):
|
||||
self.dispatch('on_beforeswitch_landscape')
|
||||
self.clear_widgets()
|
||||
self.add_widget(self.landscape_widget)
|
||||
if self.switch_button_showed:
|
||||
if self.switch_button_showed and self.cannt_rotation:
|
||||
self.set_switch_button_pos()
|
||||
if self.switch_button not in Window.children:
|
||||
Window.add_widget(self.switch_button)
|
||||
self.dispatch('on_afterswitch_landscape')
|
||||
self.panel_shape = 'landscape'
|
||||
@ -119,14 +120,14 @@ class TwoSides(WidgetReady, BoxLayout):
|
||||
self.app.get_rotation(),
|
||||
Window.size)
|
||||
if not self.portrait_widget in self.children:
|
||||
self.dispatch('on_beforeswitch_landscape')
|
||||
self.dispatch('on_beforeswitch_portrait')
|
||||
self.clear_widgets()
|
||||
self.add_widget(self.portrait_widget)
|
||||
if self.switch_button_showed:
|
||||
if self.switch_button in Window.children:
|
||||
Window.remove_widget(self.switch_button)
|
||||
self.cannt_rotation = False
|
||||
self.panel_shape = 'portrait'
|
||||
self.dispatch('on_afterswitch_landscape')
|
||||
self.dispatch('on_afterswitch_portrait')
|
||||
self.dispatch('on_interactive')
|
||||
|
||||
def on_beforeswitch_landscape(self, *args):
|
||||
|
Loading…
Reference in New Issue
Block a user