From 62a5efb315bb09b3493c41763187e687e5253006 Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Mon, 21 Oct 2019 12:59:42 +0300 Subject: [PATCH] Fix dynamic visualisations UI unit not updating gitlab #59 APROS-15720 Change-Id: I615494a5f3e791e60dc31324f7d231ea1e96967e (cherry picked from commit 77aa80f6c69a57d6eedf939ed1235208bf75dac3) --- .../ui/visualisations/DynamicVisualisationsUI.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)); -- 2.47.1