From 3c1bf990be6047b0749d707d2aea187f6195770e Mon Sep 17 00:00:00 2001 From: qua-non Date: Mon, 26 Nov 2012 06:32:35 +0530 Subject: [PATCH] UIX: Widget fix canvas positioning when inserting at first position ref: issue #819 --- 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 ae3153a4e..7e2628e53 100644 --- a/kivy/uix/widget.py +++ b/kivy/uix/widget.py @@ -280,7 +280,7 @@ class Widget(EventDispatcher): children = self.children if index >= len(children): index = len(children) - next_index = 0 + next_index = -1 else: next_child = children[index] next_index = canvas.indexof(next_child.canvas)