widget.parent.add_widget(self, index=idx + 1)
elif widget.point_area == 'bottom':
widget.parent.add_widget(self, index=idx)
- elif widget.point_area == 'left':
- parent = widget.parent
- box = parent.create_box()
- parent.add_widget(box, index=idx)
- box.add_widget(self)
- parent.remove_widget(widget)
- box.add_widget(widget)
else:
parent = widget.parent
- box = parent.create_box()
- parent.add_widget(box, index=idx)
- parent.remove_widget(widget)
- box.add_widget(widget)
- box.add_widget(self)
+ if not isinstance(parent, BoxLayout):
+ box = parent.create_box()
+ parent.add_widget(box, index=idx)
+ parent.remove_widget(widget)
+ box.add_widget(widget)
+ idx = 0
+ parent = box
+ if widget.point_area == 'left':
+ parent.add_widget(self, index=idx + 1)
+ else:
+ parent.add_widget(self, index=idx)
widget.point()
break
else: