Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2014-10-13 13:57:02 +0000
committerLaurent Redor2014-10-14 15:11:58 +0000
commit245ac7452adf98d1b0a8cd2718b81faaabfa30e1 (patch)
tree32af021ac1202e80f07f97bc12a2bef123065676
parent05278f0928fa543baa51ad386c895f35ca692953 (diff)
downloadorg.eclipse.sirius-245ac7452adf98d1b0a8cd2718b81faaabfa30e1.tar.gz
org.eclipse.sirius-245ac7452adf98d1b0a8cd2718b81faaabfa30e1.tar.xz
org.eclipse.sirius-245ac7452adf98d1b0a8cd2718b81faaabfa30e1.zip
[442289] Deal with large shape that is the first and the last shape
In this case, there is nothing to do. The distribute actions have no sense in this case. Bug: 442289 Change-Id: Ie9a276c2ddf3ce50e13bb981777d79b1959d4471 Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/edit/commands/DistributeCommand.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/edit/commands/DistributeCommand.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/edit/commands/DistributeCommand.java
index f2f4144f43..f86ab89539 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/edit/commands/DistributeCommand.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/edit/commands/DistributeCommand.java
@@ -530,6 +530,13 @@ public class DistributeCommand extends AbstractTransactionalCommand {
lastPartSecondAxis = getLastPartSecondAxisFunction.apply(part);
}
}
+ if (firstPart.equals(lastPart)) {
+ // The first part and the last part is the same (a large
+ // figure that covers all the bounds of the current selection),
+ // nothing to to!
+ return;
+ }
+
// Get the gap between each parts
int gap = getGapFunction.apply(firstPart, lastPart);
// Sort other parts according to their centers

Back to the top