Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2014-04-11 13:36:13 +0000
committerVincent Lorenzo2014-04-11 13:44:08 +0000
commitc0a5e2ea48e1a1d0bd60fa888ee9fcb490a9bbc9 (patch)
tree03842714b38109744b8e40582c6a35c1dc79dd62 /plugins/infra
parent5e34ff8147dd420d4e15c2dee0b145b886b6f783 (diff)
downloadorg.eclipse.papyrus-c0a5e2ea48e1a1d0bd60fa888ee9fcb490a9bbc9.tar.gz
org.eclipse.papyrus-c0a5e2ea48e1a1d0bd60fa888ee9fcb490a9bbc9.tar.xz
org.eclipse.papyrus-c0a5e2ea48e1a1d0bd60fa888ee9fcb490a9bbc9.zip
430702: [Diagram] Moving source of a link moves the target too. Fix obvious bugs
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/FixEdgeAnchorAfterCreationCommand.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/FixEdgeAnchorAfterCreationCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/FixEdgeAnchorAfterCreationCommand.java
index 07fda752b2a..a539432c081 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/FixEdgeAnchorAfterCreationCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/FixEdgeAnchorAfterCreationCommand.java
@@ -93,7 +93,7 @@ public class FixEdgeAnchorAfterCreationCommand extends AbstractTransactionalComm
final IFigure targetFigure = (IFigure)requestParameters.get(RequestParameterConstants.EDGE_TARGET_FIGURE);
final Point sourcePoint = (Point)requestParameters.get(RequestParameterConstants.EDGE_SOURCE_POINT);
final Point targetPoint = (Point)requestParameters.get(RequestParameterConstants.EDGE_TARGET_POINT);
- if(createdEdge != null && sourceFigure instanceof IAnchorableFigure && targetFigure instanceof IAnchorableFigure) {
+ if(createdEdge != null && sourceFigure instanceof IAnchorableFigure && targetFigure instanceof IAnchorableFigure && sourcePoint!=null && targetPoint!=null) {
final String sourceTerminal;
final String targetTerminal;
if(sourceFigure == targetFigure) {
@@ -131,7 +131,7 @@ public class FixEdgeAnchorAfterCreationCommand extends AbstractTransactionalComm
return CommandResult.newOKCommandResult();
}
- return CommandResult.newErrorCommandResult("Some required element can't be found to fix the anchors of the created edge");//$NON-NLS-1$
+ return CommandResult.newOKCommandResult();
}
/**

Back to the top