Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2017-09-01 12:12:05 +0000
committerLaurent Redor2017-09-01 12:12:05 +0000
commit21238bee5430d76b8c3e53d2a045bf5528e345b3 (patch)
treebbcf748f4abf78228f2c52425e14390ce48e2483
parent25fccaaa7501ce7dfbce3b0d5cddba05423c21be (diff)
downloadorg.eclipse.sirius-21238bee5430d76b8c3e53d2a045bf5528e345b3.tar.gz
org.eclipse.sirius-21238bee5430d76b8c3e53d2a045bf5528e345b3.tar.xz
org.eclipse.sirius-21238bee5430d76b8c3e53d2a045bf5528e345b3.zip
[518246] Fix bug when resizing execution from the top side
If the lower bound of an execution is on the limit of the lower bound of its parent operand, the resize from the top side to top was possible until 5 pixels. But it should be only be possible for 4 pixels. Otherwise, there was a bug because the execution is moved above the start of the operand. Bug: 518246 Change-Id: I7f7c752e367b739a19cfd11911fadff85a08405f Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/edit/validator/AbstractNodeEventResizeSelectionValidator.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/edit/validator/AbstractNodeEventResizeSelectionValidator.java b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/edit/validator/AbstractNodeEventResizeSelectionValidator.java
index f74060da56..a590c54878 100644
--- a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/edit/validator/AbstractNodeEventResizeSelectionValidator.java
+++ b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/tool/internal/edit/validator/AbstractNodeEventResizeSelectionValidator.java
@@ -211,8 +211,11 @@ public class AbstractNodeEventResizeSelectionValidator {
}
}
} else if (requestQuery.isResizeFromTop()) {
- // We consider that parent is resize before if needed.
- okForParent = true;
+ // We consider that parent is resize before if needed. There is just an exception when the execution is just
+ // on the lower bound limit of the operand.
+ if (parent.getVerticalRange().getLowerBound() != RangeHelper.verticalRange(newBounds).getLowerBound()) {
+ okForParent = true;
+ }
} else if (parent.getValidSubEventsRange().includes(RangeHelper.verticalRange(newBounds))) {
okForParent = true;
}

Back to the top