Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2018-01-09 12:29:19 +0000
committerSravan Kumar Lakkimsetti2018-01-10 10:58:14 +0000
commit8dccd3a1c831a50c2932e16e9e61bc3e5a562ba4 (patch)
treed1b69f89390d6527b8762ab4bf63c49d6511bad1 /bundles
parentb3d070837125ff27f3e23556d91383fcb81be159 (diff)
downloadeclipse.platform.swt-8dccd3a1c831a50c2932e16e9e61bc3e5a562ba4.tar.gz
eclipse.platform.swt-8dccd3a1c831a50c2932e16e9e61bc3e5a562ba4.tar.xz
eclipse.platform.swt-8dccd3a1c831a50c2932e16e9e61bc3e5a562ba4.zip
Bug 529474 - [GTK]
SimpleTableViewerTest.testLabelProviderListenersWithColumn fails since I20180105-2000 Change-Id: I4e3db27af8c1f8740356f08514b3c0d17ff39151 Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java9
3 files changed, 20 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 0d427ae8d4..4bd5b07817 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -742,6 +742,15 @@ void createItem (TableColumn column, int index) {
System.arraycopy (cellFont, index, temp, index+1, columnCount-index-1);
item.cellFont = temp;
}
+ String [] strings = item.strings;
+ if (strings != null) {
+ String [] temp = new String [columnCount];
+ System.arraycopy (strings, 0, temp, 0, index);
+ System.arraycopy (strings, index, temp, index+1, columnCount-index-1);
+ temp [index] = "";
+ item.strings = temp;
+ }
+
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index cd07ab446a..769ef891d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
@@ -1356,7 +1356,8 @@ public void setImageIndent (int indent) {
public void setText (int index, String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
- if (_getText (index).equals (string)) return;
+ if (getText (index).equals (string)) return;
+
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
if (0 <= index && index < count) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index d81078a6b9..4011ba7a93 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -855,6 +855,15 @@ void createItem (TreeColumn column, int index) {
System.arraycopy (cellFont, index, temp, index+1, columnCount-index-1);
item.cellFont = temp;
}
+ String [] strings = item.strings;
+ if (strings != null) {
+ String [] temp = new String [columnCount];
+ System.arraycopy (strings, 0, temp, 0, index);
+ System.arraycopy (strings, index, temp, index+1, columnCount-index-1);
+ temp [index] = "";
+ item.strings = temp;
+ }
+
}
}
}

Back to the top