Skip to content
Snippets Groups Projects
Verified Commit 0377b2e7 authored by dos's avatar dos
Browse files

py,st3m: ViewManager: Only draw outgoing view at transition start

Solves a potential issue with .draw being called before the first
.think on the incoming view.
parent 023c04ff
No related branches found
No related tags found
No related merge requests found
Pipeline #8836 passed
...@@ -260,6 +260,12 @@ class ViewManager(Responder): ...@@ -260,6 +260,12 @@ class ViewManager(Responder):
def draw(self, ctx: Context) -> None: def draw(self, ctx: Context) -> None:
if self._transitioning: if self._transitioning:
if self._transition == 0.0:
ctx.save()
self._outgoing.draw(ctx)
ctx.restore()
return
if self._transition >= 1.0: if self._transition >= 1.0:
self._fully_drawn += 1 self._fully_drawn += 1
...@@ -292,7 +298,6 @@ class ViewManager(Responder): ...@@ -292,7 +298,6 @@ class ViewManager(Responder):
self._pending = r self._pending = r
self._pending_vt = override_vt self._pending_vt = override_vt
self._pending_direction = direction self._pending_direction = direction
self._end_transition()
def push(self, r: View, override_vt: Optional[ViewTransition] = None) -> None: 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