DockableWidget.removeAll leaves widget non-empty
Brought to you by:
peastman
the following code:
DockableWidget dockable = ...
dockable.setContent(...);
dockable.removeAll();
System.out.println("kids=" + dockable.getChildCount() + "; check=" + dockable.getChildren().size());
will print "kids=1; check=1"
The problem is that DockableWidget.getChildCount() and .getChildren() test if 'content' is non-null, but neither remove() nor removeAll() set contents to null.
The fix is to add the following line at the end of DockableWidget.remove(Widget widget):
content = null;
Cheers!
Nik