Shift-R: paste relations from previously selected object, as per #3596.
[potlatch2.git] / net / systemeD / potlatch2 / controller / NoSelection.as
index 5c5f8800b1ff42e4b513cb9509ce1e9c5fb20f5d..873ddb8a2fc3d7427dfc907bd0c68c78f0b9014f 100644 (file)
@@ -23,10 +23,11 @@ package net.systemeD.potlatch2.controller {
                        var paint:MapPaint = getMapPaint(DisplayObject(event.target));
                        var focus:Entity = getTopLevelFocusEntity(entity);
 
-                       if (event.type==MouseEvent.MOUSE_UP && (focus==null || (paint && paint.isBackground)) && map.dragstate!=map.DRAGGING) {
+                       if (event.type==MouseEvent.MOUSE_UP && (focus==null || (paint && paint.isBackground)) && map.dragstate!=map.DRAGGING && map.dragstate!=map.SWALLOW_MOUSEUP) {
                                map.dragstate=map.NOT_DRAGGING;
+                               // ** FIXME: BeginWayAction ought to be a discrete class
                                var undo:CompositeUndoableAction = new BeginWayAction();
-                               var conn:Connection = editableLayer.connection;
+                               var conn:Connection = layer.connection;
                                var startNode:Node = conn.createNode(
                                        {}, 
                                        controller.map.coord2lat(event.localY),