don't break when you ctrl-click the background
authorRichard Fairhurst <richard@systemed.net>
Tue, 30 Nov 2010 19:02:40 +0000 (19:02 +0000)
committerRichard Fairhurst <richard@systemed.net>
Tue, 30 Nov 2010 19:02:40 +0000 (19:02 +0000)
net/systemeD/potlatch2/controller/DrawWay.as
net/systemeD/potlatch2/controller/SelectedMultiple.as
net/systemeD/potlatch2/controller/SelectedPOINode.as
net/systemeD/potlatch2/controller/SelectedWay.as

index f88b968259d39a9b3562a7fddf59bb50245358d3..5aaed85ad6a535b588ccdae68bd1b6e935062b33 100644 (file)
@@ -161,6 +161,7 @@ package net.systemeD.potlatch2.controller {
                                case 27:                                        return keyExitDrawing();
                                case Keyboard.DELETE:           return backspaceNode(MainUndoStack.getGlobalStack().addAction);
                                case Keyboard.BACKSPACE:        return backspaceNode(MainUndoStack.getGlobalStack().addAction);
+                               case 189:                                       return backspaceNode(MainUndoStack.getGlobalStack().addAction);
                                case 82:                                        repeatTags(firstSelected); return this;
                        }
                        var cs:ControllerState = sharedKeyboardEvents(event);
index ea3db7cca1438778bfb417c8f217f65a5e4578b9..912195e5adc69de6cf871329cb28ffc07e18e42d 100644 (file)
@@ -19,7 +19,7 @@ package net.systemeD.potlatch2.controller {
                        if (event.type==MouseEvent.MOUSE_MOVE || event.type==MouseEvent.ROLL_OVER || event.type==MouseEvent.MOUSE_OUT) { return this; }
                        var focus:Entity = getTopLevelFocusEntity(entity);
 
-                       if ( event.type == MouseEvent.MOUSE_DOWN && event.ctrlKey ) {
+                       if ( event.type == MouseEvent.MOUSE_DOWN && entity && event.ctrlKey ) {
                                // modify selection
                                controller.map.setHighlight(entity, { selected: toggleSelection(entity) });
                                controller.updateSelectionUI();
index 7e8ae548baf989c60a1b8c33b9a8f17eb77021e3..ca236e6fd1b87ec791889a677c76aacfdc7053e5 100644 (file)
@@ -33,6 +33,9 @@ package net.systemeD.potlatch2.controller {
         
         override public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
                        if (event.type==MouseEvent.MOUSE_MOVE) { return this; }
+                       if (event.type==MouseEvent.MOUSE_DOWN && event.ctrlKey && entity && entity!=firstSelected) {
+                               return new SelectedMultiple([firstSelected,entity]);
+                       }
                        var cs:ControllerState = sharedMouseEvents(event, entity);
                        return cs ? cs : this;
         }
index 7e9bf50a77476fcaf2c57ef9d73454c81898e183..d2fa2cc89d3ccfb38c3ce6732fe5ed95bdee5990 100644 (file)
@@ -56,7 +56,7 @@ package net.systemeD.potlatch2.controller {
                 var d:DragWayNode=new DragWayNode(firstSelected as Way, -1, event, true);
                                d.forceDragStart();
                                return d;
-                       } else if ( event.type == MouseEvent.MOUSE_DOWN && event.ctrlKey && entity!=firstSelected) {
+                       } else if ( event.type == MouseEvent.MOUSE_DOWN && event.ctrlKey && entity && entity!=firstSelected) {
                                // multiple selection
                                return new SelectedMultiple([firstSelected,entity]);
                        }