Mercurial > fife-parpg
comparison engine/extensions/pychan/widgets.py @ 194:9631a2958851
* Object selector can now be toggled to use either the old list format or show preview images.
* Fixed a small bug in ScrollArea.removeChild() fife.ScrollArea.setContent(None) does not work,
so the client would crash on calling that function.
I now set an empty pychan.Container. There might be a better way to do this.
author | nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 01 Mar 2009 10:59:17 +0000 |
parents | 9661d611b346 |
children | 54bfd1015b35 |
comparison
equal
deleted
inserted
replaced
193:9661d611b346 | 194:9631a2958851 |
---|---|
1658 widget.parent = self | 1658 widget.parent = self |
1659 | 1659 |
1660 def removeChild(self,widget): | 1660 def removeChild(self,widget): |
1661 if self._content != widget: | 1661 if self._content != widget: |
1662 raise RuntimeError("%s does not have %s as direct child widget." % (str(self),str(widget))) | 1662 raise RuntimeError("%s does not have %s as direct child widget." % (str(self),str(widget))) |
1663 self.content = None | 1663 # Set a Container here, as this can not be set to None |
1664 # Might be possible to find a better solution, needs peer review | |
1665 self.content = Container() | |
1664 widget.parent = None | 1666 widget.parent = None |
1665 | 1667 |
1666 def _setContent(self,content): | 1668 def _setContent(self,content): |
1667 self.real_widget.setContent(content.real_widget) | 1669 self.real_widget.setContent(content.real_widget) |
1668 self._content = content | 1670 self._content = content |