From: miettinen Date: Fri, 8 Feb 2013 06:36:01 +0000 (+0000) Subject: Fixing a bit more properly (refs #4048). It might work. X-Git-Tag: simantics-1.10.1~49 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=397686b01105bfaf50940866927d31e6bc707589;p=simantics%2Fsysdyn.git Fixing a bit more properly (refs #4048). It might work. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26738 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java index 70879feb..ce09e6a8 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java @@ -224,7 +224,6 @@ public class ShortcutTabWidget implements Widget { * Sort items to alphabetical order. */ private void sort() { - // First sort all items TableItem[] connectedVariables = variableTable.getItems(); Collator collator = Collator.getInstance(Locale.getDefault()); for (int i = 1; i < connectedVariables.length; i++) { @@ -232,12 +231,11 @@ public class ShortcutTabWidget implements Widget { for (int j = 0; j < i; j++) { String value2 = connectedVariables[j].getText(0); if (collator.compare(value1, value2) < 0) { - String[] values = { connectedVariables[i].getText(0), - connectedVariables[i].getText(1) }; + String value = connectedVariables[i].getText(0); connectedVariables[i].dispose(); TableItem item2 = new TableItem(variableTable, SWT.NONE, j); - item2.setText(values); - item2.setData(values); + item2.setText(value); + item2.setData(value); connectedVariables = variableTable.getItems(); break; }