From e931eb2920a73713ac2c88e049ebd60372a466fc Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Fri, 22 Mar 2013 16:24:49 -0500 Subject: [PATCH] widget: fix index (forgot to use newly created canvas.has_before property) --- kivy/uix/widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py index ff5194408..abee4a717 100644 --- a/kivy/uix/widget.py +++ b/kivy/uix/widget.py @@ -291,7 +291,7 @@ class Widget(EventDispatcher): children.insert(index, widget) # we never want to insert widget _before_ canvas.before. - if next_index == 0: + if next_index == 0 and canvas.has_before: next_index = 1 canvas.insert(next_index, widget.canvas)