Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbblajer2007-06-20 10:17:42 +0000
committerbblajer2007-06-20 10:17:42 +0000
commit3e11ee68212755565f8466401ccb92a3c213f14e (patch)
tree02a01fc57b191bdeec176af846fc5116c5edd9d1 /plugins/org.eclipse.gmf.runtime.lite/src/org
parent5d9445e360827d82b2d65423439c87e31e82c3b2 (diff)
downloadorg.eclipse.gmf-tooling-3e11ee68212755565f8466401ccb92a3c213f14e.tar.gz
org.eclipse.gmf-tooling-3e11ee68212755565f8466401ccb92a3c213f14e.tar.xz
org.eclipse.gmf-tooling-3e11ee68212755565f8466401ccb92a3c213f14e.zip
createChildEditPolicy should not override an edit policy the child may have set
Diffstat (limited to 'plugins/org.eclipse.gmf.runtime.lite/src/org')
-rw-r--r--plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/edit/policies/ListLayoutEditPolicy.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/edit/policies/ListLayoutEditPolicy.java b/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/edit/policies/ListLayoutEditPolicy.java
index 843694a11..61a3f37a3 100644
--- a/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/edit/policies/ListLayoutEditPolicy.java
+++ b/plugins/org.eclipse.gmf.runtime.lite/src/org/eclipse/gmf/runtime/lite/edit/policies/ListLayoutEditPolicy.java
@@ -16,6 +16,7 @@ import java.util.List;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
@@ -78,4 +79,13 @@ public abstract class ListLayoutEditPolicy extends ConstrainedLayoutEditPolicy {
protected Object getConstraintFor(Rectangle rect) {
return null;
}
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result != null) {
+ return result;
+ }
+ return super.createChildEditPolicy(child);
+ }
}

Back to the top