Fixes a bug in SplitLayoutPanel where calling setWidgetMinSize() on the center widget, the last widget, or a widget that is not a child results in an NPE or IndexOutOfBoundsException.  The occured because getAssocatedSplitter() had an off by one bug and didn't check for an idx of -1. This patch asserts that the widget is a child, which is typical of other methods in DockLayoutPanel.

In addition, this patch fixes a bug where remove(myWidget) would always remove widget 0 instead of the splitter associated with myWidget because we were getting the idx of myWidget after it was removed, at which point it was -1. We now get the idx before removing the widget.

Review at http://gwt-code-reviews.appspot.com/378802

Review by: jgw@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7965 8db76d5a-ed1c-0410-87a9-c151d255dfc7
3 files changed