> One suggestion was to use the UndoRedoHandler code to catch > modifications and reindex the primitives. How about something like > this? .... I'm not sure if the code will work for one moved node. You first call reIndexPrimitives(modified) that might move node to different bucket and then try to get ways, that still think the node is in the old buckets. Anyway after some modifications it should work, at least as a temporary solution.
So I will replace direct access to QuadBuckets with getNodes() method returning read-only collection and add search method. Internally Dataset will use both QuadBuckets for fast access by coordinates and Storage for fast access using id and iterations. Because dataset modifications will be possible only through Dataset methods, it shouldn't be problem to keep the two lists synchronized. -- Jiri _______________________________________________ josm-dev mailing list josm-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/josm-dev