]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
* Changed the order in which the functions are shown in ShortcutTabWidget and in...
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 21 Feb 2013 07:43:59 +0000 (07:43 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 21 Feb 2013 07:43:59 +0000 (07:43 +0000)
* A bug fix.

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26838 ac1ea38d-2e2b-0410-8846-a27921b304fc

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

index 9fdc02ddebc39c0cb677c5daf5a6957e996e3421..e476da1c517808f94e7c4b71b7fb63ee33a336f5 100644 (file)
@@ -78,7 +78,7 @@ public class ShortcutTabWidget implements Widget {
         functions.setText("Functions"); \r
 \r
         functionTable = new Table (tabFolder, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.NO_FOCUS | SWT.HIDE_SELECTION);\r
-        TableItem item = new TableItem(functionTable, SWT.NONE);\r
+        TableItem item;\r
         \r
         //Finding functions\r
         ArrayList<Function> functionList = Function.getAllFunctions();\r
@@ -86,10 +86,10 @@ public class ShortcutTabWidget implements Widget {
                Collections.sort(functionList);\r
                \r
                for(Function function : functionList){\r
+            item = new TableItem(functionTable, SWT.NONE);\r
                        item.setText(function.getName() + "()");\r
                        item.setData(function.getName() + "(" + function.getParameterList() + ")");\r
                        item.setImage(Function.getImage(functionTable.getDisplay(), function));\r
-                       item = new TableItem(functionTable, SWT.NONE);\r
                }\r
                \r
         functions.setControl(functionTable);\r
index 7e711018898be08894138af91436b7b6af32eada..00f45a32757e7916e062ee5f00263465e9a61283 100644 (file)
@@ -35,10 +35,10 @@ public class Function implements Comparable<Function>{
     public enum Type {\r
         USER_DEFINED,\r
         SHARED,\r
-        VENSIM,\r
         SYSDYN,\r
         MODELICA, \r
-        MODELICA_ARRAY \r
+        MODELICA_ARRAY,\r
+        VENSIM\r
     }\r
     \r
     /**\r