Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2016-08-23 15:24:08 +0000
committerSravan Kumar Lakkimsetti2016-08-23 15:24:08 +0000
commitf7fbbdd18d1837de34c7751574de69197816e5fb (patch)
tree6a83ab0d087f9ac41ae9a195c2033da734288ebd
parentb2da17e7f1983a289a269b0e60fe680e47b89408 (diff)
downloadeclipse.platform.swt-f7fbbdd18d1837de34c7751574de69197816e5fb.tar.gz
eclipse.platform.swt-f7fbbdd18d1837de34c7751574de69197816e5fb.tar.xz
eclipse.platform.swt-f7fbbdd18d1837de34c7751574de69197816e5fb.zip
Revert "Bug 497812 - requestLayout not layout correctly"
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java14
3 files changed, 6 insertions, 36 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index cfd52dc67d..385b232c24 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
@@ -226,12 +226,7 @@ public void changed (Control[] changed) {
}
for (int i=0; i<changed.length; i++) {
Control child = changed [i];
- Composite composite;
- if (child instanceof Composite) {
- composite = (Composite)child;
- } else {
- composite = child.parent;
- }
+ Composite composite = child.parent;
while (child != this) {
if (composite.layout == null || !composite.layout.flushCache (child)) {
composite.state |= LAYOUT_CHANGED;
@@ -872,12 +867,7 @@ 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;
- if (child instanceof Composite) {
- composite = (Composite)child;
- } else {
- composite = child.parent;
- }
+ Composite composite = child.parent;
while (child != this) {
if (composite.layout != null) {
composite.state |= LAYOUT_NEEDED;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index eec1dfcf06..24753365c5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -197,12 +197,7 @@ public void changed (Control[] changed) {
}
for (int i=0; i<changed.length; i++) {
Control child = changed [i];
- Composite composite;
- if (child instanceof Composite) {
- composite = (Composite)child;
- } else {
- composite = child.parent;
- }
+ Composite composite = child.parent;
while (child != this) {
if (composite.layout == null || !composite.layout.flushCache (child)) {
composite.state |= LAYOUT_CHANGED;
@@ -1180,12 +1175,7 @@ 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;
- if (child instanceof Composite) {
- composite = (Composite)child;
- } else {
- composite = child.parent;
- }
+ Composite composite = child.parent;
while (child != this) {
if (composite.layout != null) {
composite.state |= LAYOUT_NEEDED;
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 f0b0f74d8e..0eca1afe96 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,12 +174,7 @@ public void changed (Control[] changed) {
}
for (int i=0; i<changed.length; i++) {
Control child = changed [i];
- Composite composite;
- if (child instanceof Composite) {
- composite = (Composite)child;
- } else {
- composite = child.parent;
- }
+ Composite composite = child.parent;
while (child != this) {
if (composite.layout == null || !composite.layout.flushCache (child)) {
composite.state |= LAYOUT_CHANGED;
@@ -849,12 +844,7 @@ 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;
- if (child instanceof Composite) {
- composite = (Composite)child;
- } else {
- composite = child.parent;
- }
+ Composite composite = child.parent;
while (child != this) {
if (composite.layout != null) {
composite.state |= LAYOUT_NEEDED;

Back to the top