Make sure Importers notice POI nodes
authorRichard Fairhurst <richard@systemeD.net>
Thu, 24 May 2012 07:01:39 +0000 (08:01 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Thu, 24 May 2012 07:01:39 +0000 (08:01 +0100)
net/systemeD/halcyon/connection/Connection.as
net/systemeD/halcyon/connection/XMLBaseConnection.as
net/systemeD/potlatch2/utils/GpxImporter.as
net/systemeD/potlatch2/utils/Importer.as

index 94a9b05..7828885 100644 (file)
@@ -188,6 +188,14 @@ package net.systemeD.halcyon.connection {
             }
         }
 
+        public function registerPOINodes():void {
+            for each (var nodeID:Number in getAllNodeIDs()) {
+                var node:Node = getNode(nodeID);
+                if (!node.hasParentWays)
+                    registerPOI(node);
+            }
+        }
+
         public function getNode(id:Number):Node {
             return nodes[id];
         }
index 5de8112..2ab736a 100644 (file)
@@ -171,14 +171,6 @@ package net.systemeD.halcyon.connection {
                        if (statusFetcher) statusFetcher.fetch(createdEntities); 
                }
                
-               protected function registerPOINodes():void {
-                       for each (var nodeID:Number in getAllNodeIDs()) {
-                               var node:Node = getNode(nodeID);
-                               if (!node.hasParentWays)
-                                       registerPOI(node);
-                       }
-               }
-
                protected function parseTags(tagElements:XMLList):Object {
                        var tags:Object = {};
                        for each (var tagEl:XML in tagElements)
index 88dba75..6342b82 100644 (file)
@@ -42,7 +42,6 @@ package net.systemeD.potlatch2.utils {
                                        tags[tag.name().localName]=tag.toString().substr(0,255);
                                }
                                var node:Node = connection.createNode(tags, wpt.@lat, wpt.@lon, push);
-                               connection.registerPOI(node);
                        }
 
                        default xml namespace = new Namespace("");
index c3ff660..73d3481 100644 (file)
@@ -82,6 +82,7 @@ package net.systemeD.potlatch2.utils {
                        var action:CompositeUndoableAction = new CompositeUndoableAction("Import layer "+connection.name);
                        doImport(action.push);
                        action.doAction(); // just do it, don't add to undo stack
+                       connection.registerPOINodes();
                        if (callback!=null) { callback(connection,options,true); }
                }