diff options
author | Paul D'Pong | 2020-09-01 16:56:59 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2020-09-08 19:04:19 +0000 |
commit | 15cc22be513670ccd1e8f4f866d755bc7d90c7c1 (patch) | |
tree | 4ab2f3c818bf6f2a301736f272d6aebd7df295ed | |
parent | 0d843584f3eb397d2a2e2c4830309f3cc8605fed (diff) | |
download | eclipse.platform.swt-15cc22be513670ccd1e8f4f866d755bc7d90c7c1.tar.gz eclipse.platform.swt-15cc22be513670ccd1e8f4f866d755bc7d90c7c1.tar.xz eclipse.platform.swt-15cc22be513670ccd1e8f4f866d755bc7d90c7c1.zip |
Bug 566130 - Use varargs in SashForm#setWeights
Very simple change to allow for SashForm#setWeights to accept varargs.
Change-Id: Ib618a2188d16c1e5dc44c2a998cf33b634a84306
Signed-off-by: Paul D'Pong <sdamrong@redhat.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java index a556002ea3..ac5cd11cd5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java @@ -442,7 +442,7 @@ public void setToolTipText(String string) { * <li>ERROR_INVALID_ARGUMENT - if the weights value is null or of incorrect length (must match the number of children)</li> * </ul> */ -public void setWeights(int[] weights) { +public void setWeights(int... weights) { checkWidget(); Control[] cArray = getControls(false); if (weights == null || weights.length != cArray.length) { @@ -459,6 +459,7 @@ public void setWeights(int[] weights) { if (total == 0) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } + for (int i = 0; i < cArray.length; i++) { Object data = cArray[i].getLayoutData(); if (data == null || !(data instanceof SashFormData)) { |