Reinstate the long-lost G shortcut
authorRichard Fairhurst <richard@systemeD.net>
Tue, 1 Nov 2011 14:47:00 +0000 (14:47 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Tue, 1 Nov 2011 14:47:00 +0000 (14:47 +0000)
net/systemeD/potlatch2/controller/ControllerState.as
net/systemeD/potlatch2/help/HelpDialog.mxml
net/systemeD/potlatch2/utils/TrackLoader.as

index 7acac44..27f3b56 100644 (file)
@@ -11,6 +11,7 @@ package net.systemeD.potlatch2.controller {
        import flash.ui.Keyboard;
        import mx.controls.Alert;
        import mx.events.CloseEvent;
+       import mx.core.FlexGlobals;
        
     /** Represents a particular state of the controller, such as "dragging a way" or "nothing selected". Key methods are 
     * processKeyboardEvent and processMouseEvent which take some action, and return a new state for the controller. 
@@ -77,6 +78,7 @@ package net.systemeD.potlatch2.controller {
                                case 66:        setSourceTag(); break;                                                                                                  // B - set source tag for current object
                                case 67:        editableLayer.connection.closeChangeset(); break;                                               // C - close changeset
                                case 68:        editableLayer.alpha=1.3-editableLayer.alpha; return null;                               // D - dim
+                               case 71:        FlexGlobals.topLevelApplication.trackLoader.load(); break;                              // G - GPS tracks **FIXME: move from Application to Map
                                case 83:        SaveManager.saveChanges(editableLayer.connection); break;                               // S - save
                                case 84:        controller.tagViewer.togglePanel(); return null;                                                // T - toggle tags panel
                                case 90:        if (!event.shiftKey) { MainUndoStack.getGlobalStack().undo(); return null;}// Z - undo
index 0c64b4d..45f2972 100644 (file)
                             [", .", "Cycle through nodes in way"],
                             ["D", "Dim features"],
                             ["F", "Follow existing way"],
+                            ["G", "Load GPS points"],
                             ["M", "Maximise editor"],
                             ["P", "Create parallel way"],
                             ["Q", "Make area right-angled"],
index 2c7dcbe..c2b1f9f 100644 (file)
@@ -62,16 +62,8 @@ package net.systemeD.potlatch2.utils {
                private function parseGPX(event:Event):void {
                        var file:XML = new XML(event.target.data);
                        var action:CompositeUndoableAction = new CompositeUndoableAction("add track objects");
-                       for each (var ns:Namespace in file.namespaceDeclarations()) {
-                               if (ns.uri.match(/^http:\/\/www\.topografix\.com\/GPX\/1\/[01]$/)) {
-                                       default xml namespace = ns;
-                               }
-                       }
-
                        Trace.parseTrkSegs(file,connection,action);
             action.doAction(); /* just do it, don't add to undo stack */
-
-                       default xml namespace = new Namespace("");
                        layer.updateEntityUIs(false, false);
                }