]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeViewerData.java
Fix change of type in component property editor when range is present
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / componentTypeEditor / ComponentTypeViewerData.java
index 1c4b22ee0762cbc2f6f2a2b248d4b7d53e4ce895..ea10d6d8d4e44d700cf6cc789b97ca49ed9e6e6c 100644 (file)
@@ -216,7 +216,7 @@ public class ComponentTypeViewerData {
         editor.setEditor(text, selectedItem, column);
     }
 
-    public void editType(Table table, TableEditor editor, final ComponentTypeViewerPropertyInfo propertyInfo, TableItem selectedItem, int column, final boolean convertDefaultValue) {
+    public void editType(Table table, TableEditor editor, final ComponentTypeViewerPropertyInfo propertyInfo, TableItem selectedItem, int column, String range, final boolean convertDefaultValue) {
         int extraStyle = propertyInfo.immutable ? SWT.READ_ONLY : 0;
         final Combo combo = new Combo(table, SWT.NONE | extraStyle);
         combo.setText(selectedItem.getText(column));
@@ -252,6 +252,7 @@ public class ComponentTypeViewerData {
                             throws DatabaseException {
                         graph.markUndoPoint();
                         ComponentTypeCommands.editType(graph, componentType, propertyInfo.resource, convertDefaultValue, newValue);
+                        if (range != null) ComponentTypeCommands.setRange(graph, componentType, propertyInfo.resource, range);
                     }
                 });
             }