Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Fasani2018-11-22 16:32:14 +0000
committerLaurent Fasani2018-11-26 09:04:41 +0000
commit40a837a74d6f18347601884c655c62d9ce649627 (patch)
tree9a282fdb0cdc5aea098b0e2c338e604a11008546
parent7f8dfd96be7ce7449b2a19357d84a6a4f7e2fe8f (diff)
downloadorg.eclipse.sirius-40a837a74d6f18347601884c655c62d9ce649627.tar.gz
org.eclipse.sirius-40a837a74d6f18347601884c655c62d9ce649627.tar.xz
org.eclipse.sirius-40a837a74d6f18347601884c655c62d9ce649627.zip
[541412] Fix bad borderedNode source feedback when zoom is active
* When drag and dropping a border node from a node to its parent, the source feedback is now correct, when zoom is activated, in size and in location. Bug : 541412 Change-Id: I2da769414aca5485985224c08f92272f3518940c Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SpecificBorderItemSelectionEditPolicy.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SpecificBorderItemSelectionEditPolicy.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SpecificBorderItemSelectionEditPolicy.java
index 7a03595928..4a9ae56bdc 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SpecificBorderItemSelectionEditPolicy.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SpecificBorderItemSelectionEditPolicy.java
@@ -43,7 +43,6 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderedShapeEditPart;
@@ -284,16 +283,10 @@ public class SpecificBorderItemSelectionEditPolicy extends ResizableEditPolicyEx
} else {
borderItemLocator.setBorderItemOffset(IBorderItemOffsets.DEFAULT_OFFSET);
}
- // Verify if the dropping of bordered node is not an element
- // of the same level
+ // Verify if the dropping of bordered node is not an element of the same level
if (targetAbstractGraphicalEditPart.getParent() != getHost().getParent().getParent()) {
- // Verify if the parent is the diagram. If it, calculates the position of the ghost relative to the
- // diagram, otherwise compared to the parent
- if (targetAbstractGraphicalEditPart.getParent() instanceof DiagramEditPart) {
- targetAbstractGraphicalEditPart.getFigure().translateToAbsolute(feedbackRectangle);
- } else {
- targetAbstractGraphicalEditPart.getFigure().translateToRelative(feedbackRectangle);
- }
+ // calculates the position of the ghost relative to the parent
+ targetAbstractGraphicalEditPart.getFigure().translateToRelative(feedbackRectangle);
} else {
getHostFigure().translateToRelative(feedbackRectangle);
}

Back to the top