Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2014-03-11 13:45:25 +0000
committerVincent Lorenzo2014-03-11 14:33:17 +0000
commit0975d26d2f725ac7bb1563504cf10210161b74f5 (patch)
tree5ab79a1eeeb7c31e6ad170b3c73a5c94fddd7cad /plugins/uml
parent67c1c74a2e7135df29a40d589b4e715ced905a90 (diff)
downloadorg.eclipse.papyrus-0975d26d2f725ac7bb1563504cf10210161b74f5.tar.gz
org.eclipse.papyrus-0975d26d2f725ac7bb1563504cf10210161b74f5.tar.xz
org.eclipse.papyrus-0975d26d2f725ac7bb1563504cf10210161b74f5.zip
merge file
plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/listeners/DropTargetListener.java
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/listeners/DropTargetListener.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/listeners/DropTargetListener.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/listeners/DropTargetListener.java
index eea5043e77d..e10ff7cea22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/listeners/DropTargetListener.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/listeners/DropTargetListener.java
@@ -24,7 +24,9 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.Request;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramDropTargetListener;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.infra.services.localizer.IObjectLocalizer;
import org.eclipse.papyrus.infra.services.localizer.util.LocalizerUtil;
import org.eclipse.swt.dnd.Transfer;
@@ -49,6 +51,10 @@ public abstract class DropTargetListener extends DiagramDropTargetListener {
Request r = super.createTargetRequest();
if(r != null && r.getExtendedData() != null) {
r.getExtendedData().put(EVENT_DETAIL, getCurrentEvent().detail);
+ //430099: [Diagram] Snap to Grid for elements dropped from the ModelExplorer is ignored
+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=430099
+ boolean isSnapping = ((DiagramGraphicalViewer)getViewer()).getWorkspaceViewerPreferenceStore().getBoolean(PreferencesConstantsHelper.SNAP_TO_GRID_CONSTANT);
+ r.getExtendedData().put(PreferencesConstantsHelper.SNAP_TO_GRID_CONSTANT, isSnapping);
}
return r;
}

Back to the top