diff --git a/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java b/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java index 246402efc5..eca33e9463 100644 --- a/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java +++ b/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java @@ -83,7 +83,8 @@ public static class PriorityDecorator extends BaseDecorator { public PriorityDecorator(IDecoratorTarget decoratorTarget) { super(decoratorTarget); } - + + @Override public void refresh() { removeDecoration(); @@ -119,7 +120,9 @@ public void createDecorators(TransitionEditPart editPart) { public int getPriority(TransitionEditPart editPart) { Transition transition = ((Transition) editPart.resolveSemanticElement()); Vertex container = (Vertex) transition.eContainer(); - return container.getOutgoingTransitions().indexOf(transition); + int indexOf = container.getOutgoingTransitions().indexOf(transition); + // visible priority should start with 1 + return indexOf+1; } }