When widgets are added to a DeckPanel, their visibility, height, and width
attributes are modified. When these widgets are removed from the panel, the
modifications to these attributes still remain. To fix this problem, an
implementation of the disown(Widget) method has been added to DeckPanel. This
implementation calls the superclass' disown method, makes the widget visible,
and then clears out the width and height attributes of the widget.

This fix is very similar to the one for issue #626, where attributes set on a
widget by AbsolutePanel persisted after the widget was removed from the panel.

It is debatable as to whether the code to reset the attributes should have been
put in the remove(Widget) method or not. If the code was put there, then we
would have saved ourselves a method call. However, from the standpoint of
correctness, disown(Widget) seems like the best place to put this code, because
it is a required call when a widget is removed from a panel, and it is also the
last step before the widget is actually removed from the panel. 

Issue: 981
Patch by: fredsa,rdayal
Review by: jgw


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1033 8db76d5a-ed1c-0410-87a9-c151d255dfc7
1 file changed