diff options
author | Stefan Xenos | 2016-07-20 07:01:23 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2016-08-21 09:37:55 +0000 |
commit | 34178a39a9bbcf038533dd42605b8348974fd195 (patch) | |
tree | 6b11d413e2287e8bc3ae5cdf82d8d3cbaabc5321 /bundles/org.eclipse.swt/Eclipse SWT/win32/org | |
parent | d5aaf6787e634fc7205b27242335ef52d1b330a1 (diff) | |
download | eclipse.platform.swt-34178a39a9bbcf038533dd42605b8348974fd195.tar.gz eclipse.platform.swt-34178a39a9bbcf038533dd42605b8348974fd195.tar.xz eclipse.platform.swt-34178a39a9bbcf038533dd42605b8348974fd195.zip |
Bug 497812 - requestLayout not layout correctly
Change-Id: Ic5c0dd7e8a12bc8998aa14a7bb841821a6ddf241
Signed-off-by: Stefan Xenos <sxenos@gmail.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java index 0eca1afe96..f0b0f74d8e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java @@ -174,7 +174,12 @@ public void changed (Control[] changed) { } for (int i=0; i<changed.length; i++) { Control child = changed [i]; - Composite composite = child.parent; + Composite composite; + if (child instanceof Composite) { + composite = (Composite)child; + } else { + composite = child.parent; + } while (child != this) { if (composite.layout == null || !composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED; @@ -844,7 +849,12 @@ public void layout (Control [] changed, int flags) { Composite [] update = new Composite [16]; for (int i=0; i<changed.length; i++) { Control child = changed [i]; - Composite composite = child.parent; + Composite composite; + if (child instanceof Composite) { + composite = (Composite)child; + } else { + composite = child.parent; + } while (child != this) { if (composite.layout != null) { composite.state |= LAYOUT_NEEDED; |