widget: fix index (forgot to use newly created canvas.has_before property)

This commit is contained in:
Mathieu Virbel 2013-03-22 16:24:49 -05:00
parent 21c5b727c5
commit e931eb2920
1 changed files with 1 additions and 1 deletions

View File

@ -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)