Skip to content
Snippets Groups Projects
Commit 6dfbad01 authored by dos's avatar dos Committed by ave
Browse files

py,st3m: ViewManager: End previous transition when starting a new one

This ensures that on_transition_done gets called in case a new transition
starts while the old one did not end yet.
parent 0b7a8bc6
Branches
Tags
No related merge requests found
......@@ -259,6 +259,8 @@ class ViewManager(Responder):
The new view will _not_ be added to history!
"""
if self._transitioning:
self._end_transition()
self._transitioning = True
self._transition = 0.0
self._direction = direction
......@@ -272,7 +274,7 @@ class ViewManager(Responder):
self._incoming.on_enter(self)
self._overriden_vt = overide_vt
if self._outgoing is None:
self._transition = 1.0
self._end_transition()
def push(self, r: View, override_vt: Optional[ViewTransition] = None) -> None:
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment