Snap to grid after releasing Ctrl button and creating a new component

This commit is contained in:
bancika
2013-03-04 09:59:55 +00:00
parent b6c1ebd079
commit e84e0c10e1
@@ -706,6 +706,13 @@ public class Presenter implements IPlugInPort {
@Override @Override
public void mouseMoved(Point point, boolean ctrlDown, boolean shiftDown, public void mouseMoved(Point point, boolean ctrlDown, boolean shiftDown,
boolean altDown) { boolean altDown) {
if (shiftDown) {
dragAction = IPlugInPort.DND_TOGGLE_SNAP;
} else {
dragAction = 0;
}
Map<IDIYComponent<?>, Set<Integer>> components = new HashMap<IDIYComponent<?>, Set<Integer>>(); Map<IDIYComponent<?>, Set<Integer>> components = new HashMap<IDIYComponent<?>, Set<Integer>>();
this.previousScaledPoint = scalePoint(point); this.previousScaledPoint = scalePoint(point);
if (instantiationManager.getComponentTypeSlot() != null) { if (instantiationManager.getComponentTypeSlot() != null) {