From d54e4916938ae5b2101ddcec3a871132352575cd Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Wed, 17 Dec 2008 13:17:03 +0000 Subject: fixes somewhat invalid size change notification (ICaption notified as changed, but should be the actual paintable) svn changeset:6251/svn branch:trunk --- src/com/itmill/toolkit/terminal/gwt/client/ICaption.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ICaption.java b/src/com/itmill/toolkit/terminal/gwt/client/ICaption.java index f1e73ef536..2859a1d256 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ICaption.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ICaption.java @@ -8,6 +8,7 @@ import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.Widget; import com.itmill.toolkit.terminal.gwt.client.ui.Icon; public class ICaption extends HTML { @@ -230,9 +231,16 @@ public class ICaption extends HTML { /* * The size of the icon might affect the size of the component so we - * must report the size change to the parent + * must report the size change to the parent TODO consider moving + * the responsibility of reacting to ONLOAD from ICaption to layouts */ - Util.notifyParentOfSizeChange(this, true); + if (owner != null) { + Util.notifyParentOfSizeChange((Widget) owner, true); + } else { + ApplicationConnection.getConsole().log( + "Warning: Icon load was not notified " + + "by ICaption due paren was unknown"); + } } } -- cgit v1.2.3