From 397686b01105bfaf50940866927d31e6bc707589 Mon Sep 17 00:00:00 2001 From: miettinen Date: Fri, 8 Feb 2013 06:36:01 +0000 Subject: [PATCH] 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 --- .../sysdyn/ui/properties/widgets/ShortcutTabWidget.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; } -- 2.47.1