From: jsimomaa Date: Mon, 21 Oct 2019 09:59:42 +0000 (+0300) Subject: Fix dynamic visualisations UI unit not updating X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=77aa80f6c69a57d6eedf939ed1235208bf75dac3;p=simantics%2Fdistrict.git Fix dynamic visualisations UI unit not updating gitlab #59 APROS-15720 Change-Id: I615494a5f3e791e60dc31324f7d231ea1e96967e --- diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/visualisations/DynamicVisualisationsUI.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/visualisations/DynamicVisualisationsUI.java index 343ad420..38b57a93 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/visualisations/DynamicVisualisationsUI.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/visualisations/DynamicVisualisationsUI.java @@ -410,7 +410,6 @@ public class DynamicVisualisationsUI { Combo variableCombo = new Combo(parent, SWT.READ_ONLY); variableCombo.setItems(arrowContributions.keySet().toArray(new String[arrowContributions.size()])); - addSelectionListener(variableCombo); GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(variableCombo); @@ -424,7 +423,6 @@ public class DynamicVisualisationsUI { Button defaultButton = new Button(parent, SWT.CHECK); GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(defaultButton); - addSelectionListener(defaultButton); defaultButton.addSelectionListener(new SelectionAdapter() { @Override @@ -442,6 +440,7 @@ public class DynamicVisualisationsUI { } } }); + addSelectionListener(defaultButton); variableCombo.addSelectionListener(new SelectionAdapter() { @@ -461,6 +460,7 @@ public class DynamicVisualisationsUI { defaultButton.setSelection(true); } }); + addSelectionListener(variableCombo); arrowRows.put(object.getArrowObject().getName(), new ArrowObjectRow(label, usedButton, variableCombo, gainText, biasText, defaultButton)); @@ -866,7 +866,6 @@ public class DynamicVisualisationsUI { Combo variableCombo = new Combo(parent, SWT.READ_ONLY); variableCombo.setItems(colorContributions.keySet().toArray(new String[colorContributions.size()])); - addSelectionListener(variableCombo); GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(variableCombo); @@ -888,7 +887,6 @@ public class DynamicVisualisationsUI { Button defaultButton = new Button(parent, SWT.CHECK); GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(defaultButton); - addSelectionListener(defaultButton); defaultButton.addSelectionListener(new SelectionAdapter() { @Override @@ -916,6 +914,7 @@ public class DynamicVisualisationsUI { } } }); + addSelectionListener(defaultButton); variableCombo.addSelectionListener(new SelectionAdapter() { @@ -948,6 +947,7 @@ public class DynamicVisualisationsUI { } } }); + addSelectionListener(variableCombo); coloringRows.put(object.getColoringObject().getName(), new ColoringObjectRow(label, usedButton, variableCombo, minText, maxText, unit, colorMapCombo, defaultButton)); @@ -1029,7 +1029,6 @@ public class DynamicVisualisationsUI { Combo variableCombo = new Combo(parent, SWT.READ_ONLY); variableCombo.setItems(sizeContributions.keySet().toArray(new String[sizeContributions.size()])); - addSelectionListener(variableCombo); GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(variableCombo); @@ -1051,7 +1050,6 @@ public class DynamicVisualisationsUI { Button defaultButton = new Button(parent, SWT.CHECK); GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(defaultButton); - addSelectionListener(defaultButton); defaultButton.addSelectionListener(new SelectionAdapter() { @Override @@ -1079,6 +1077,7 @@ public class DynamicVisualisationsUI { } } }); + addSelectionListener(defaultButton); variableCombo.addSelectionListener(new SelectionAdapter() { @@ -1108,6 +1107,7 @@ public class DynamicVisualisationsUI { defaultButton.setSelection(true); } }); + addSelectionListener(variableCombo); sizingRows.put(object.getSizingObject().getName(), new SizingObjectRow(label, usedButton, variableCombo, minText, maxText, unit, sizeMapCombo, defaultButton));