commit | af1093e606315e4b1504c7910e77ff5f9291b259 | [log] [tgz] |
---|---|---|
author | Michael Wenz <michael.wenz@sap.com> | Fri Dec 08 15:51:10 2017 +0100 |
committer | Michael Wenz <michael.wenz@sap.com> | Fri Dec 08 15:51:10 2017 +0100 |
tree | b8f3d1f9cae6b4bb9c435db8837a8d2bb046431c | |
parent | abfa88cdcc9a7a8a7f93d299d12a559a8ed102f2 [diff] |
Bug 518368 - Section is refreshed twice in Propery section * Implement workaround as double triggering happens in tabbed property coding: Add check for same object in property section refresh method Change-Id: I69c275ab916c7539ed1ec125539bd9dad8d1da3f
diff --git a/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java b/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java index 29e16c5..31d9c08 100644 --- a/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java +++ b/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java
@@ -32,6 +32,7 @@ public class TutorialEClassSection extends GFPropertySection implements ITabbedPropertyConstants { private Text nameText; + private PictogramElement currentPe; @Override public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { @@ -60,7 +61,8 @@ @Override public void refresh() { PictogramElement pe = getSelectedPictogramElement(); - if (pe != null) { + if (pe != null && !pe.equals(currentPe)) { + currentPe = pe; Object bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe); // the filter assured, that it is a EClass if (bo == null)