]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network.ui/src/org/simantics/district/network/ui/techtype/table/TechTypeTable.java
Hide "enabled" column for non-component type tech type tables
[simantics/district.git] / org.simantics.district.network.ui / src / org / simantics / district / network / ui / techtype / table / TechTypeTable.java
index 7438269aba7071990b2b052cc21c539725d48d3d..f15be971df842fab31d5527669dc79e1fe0e29df 100644 (file)
@@ -181,7 +181,7 @@ public class TechTypeTable extends Composite {
                bodyDataLayer.setConfigLabelAccumulator(new IConfigLabelAccumulator() {
                        @Override
                        public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
-                               if (columnPosition == 0) {
+                               if (bodyDataProvider.isCheckBoxColumn(columnPosition)) {
                                        configLabels.addLabel(CHECK_BOX_LABEL);
                                } else if (validationResult != null && keyName != null) {
                                        int keyColumn = bodyDataProvider.getVariableIndex(keyName);
@@ -270,7 +270,7 @@ public class TechTypeTable extends Composite {
                                                new EditableRule() {
                                                        @Override
                                                        public boolean isEditable(int columnIndex, int rowIndex) {
-                                                               return columnIndex == 0;
+                                                               return bodyDataProvider.isEditable(columnIndex, rowIndex);
                                                        }
                                                });