]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fixing a bit more properly (refs #4048). It might work.
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 8 Feb 2013 06:36:01 +0000 (06:36 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 8 Feb 2013 06:36:01 +0000 (06:36 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26738 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java

index 70879febb66ed1e804e67d32069c069c6cd2cc88..ce09e6a890f7d0a822bb40499fcdd3b0d9a5d87a 100644 (file)
@@ -224,7 +224,6 @@ public class ShortcutTabWidget implements Widget {
                                         * Sort items to alphabetical order.\r
                                         */\r
                                        private void sort() {\r
-                                           // First sort all items\r
                                            TableItem[] connectedVariables = variableTable.getItems();\r
                                            Collator collator = Collator.getInstance(Locale.getDefault());\r
                                            for (int i = 1; i < connectedVariables.length; i++) {\r
@@ -232,12 +231,11 @@ public class ShortcutTabWidget implements Widget {
                                                for (int j = 0; j < i; j++) {\r
                                                    String value2 = connectedVariables[j].getText(0);\r
                                                    if (collator.compare(value1, value2) < 0) {\r
-                                                       String[] values = { connectedVariables[i].getText(0),\r
-                                                               connectedVariables[i].getText(1) };\r
+                                                       String value = connectedVariables[i].getText(0);\r
                                                        connectedVariables[i].dispose();\r
                                                        TableItem item2 = new TableItem(variableTable, SWT.NONE, j);\r
-                                                       item2.setText(values);\r
-                                                       item2.setData(values);\r
+                                                       item2.setText(value);\r
+                                                       item2.setData(value);\r
                                                        connectedVariables = variableTable.getItems();\r
                                                        break;\r
                                                    }\r