double-click to add new tag
authorRichard Fairhurst <richard@systemed.net>
Thu, 2 Sep 2010 14:58:19 +0000 (14:58 +0000)
committerRichard Fairhurst <richard@systemed.net>
Thu, 2 Sep 2010 14:58:19 +0000 (14:58 +0000)
net/systemeD/halcyon/Map.as
net/systemeD/potlatch2/TagViewer.mxml

index 8d4f1bf..a48f9e2 100755 (executable)
@@ -437,7 +437,7 @@ package net.systemeD.halcyon {
                // Miscellaneous events
                
                public function keyUpHandler(event:KeyboardEvent):void {
-                       addDebug("pressed "+event.keyCode);
+                       if (event.target is TextField) return;                          // not meant for us
                        switch (event.keyCode) {
                                case 33:        zoomIn(); break;                                        // Page Up - zoom in
                                case 34:        zoomOut(); break;                                       // Page Down - zoom out
index 1f3e3ef..213c0d1 100644 (file)
@@ -61,7 +61,9 @@
           <mx:htmlText><![CDATA[<i>No Selection</i>]]></mx:htmlText>
         </mx:Label>
 
-        <mx:DataGrid editable="true" width="100%" height="75%" id="advancedTagGrid">
+        <mx:DataGrid editable="true" width="100%" height="75%" id="advancedTagGrid" 
+            doubleClickEnabled="true"
+            doubleClick="if (event.target.parent==advancedTagGrid) { addNewTag(); }">
                 <mx:columns>
                     <mx:DataGridColumn editable="true" dataField="key" headerText="Key"/>
                     <mx:DataGridColumn editable="true" dataField="value" headerText="Value"/>
@@ -75,7 +77,8 @@
         
         <mx:DataGrid editable="true" width="100%" height="25%" id="relationsGrid"
             doubleClickEnabled="true"
-            itemDoubleClick="editRelation(relationsGrid.selectedItem.id)">
+            itemDoubleClick="editRelation(relationsGrid.selectedItem.id)"
+            doubleClick="if (event.target.parent==relationsGrid) { addToRelation(); }">
             <mx:columns>
                 <mx:DataGridColumn editable="false" dataField="description" headerText="Relation"/>
                 <mx:DataGridColumn editable="false" dataField="id_idx" headerText="ID"/>