Sort out junction highlighting when deleting a way, and leave POIs in situ
authorAndy Allan <gravitystorm@gmail.com>
Tue, 19 Oct 2010 15:02:46 +0000 (15:02 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Tue, 19 Oct 2010 15:02:46 +0000 (15:02 +0000)
TODO.txt
net/systemeD/halcyon/connection/actions/DeleteWayAction.as
net/systemeD/potlatch2/controller/SelectedWay.as

index 15c17c3..3127b61 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -44,8 +44,7 @@ Potlatch 2: main outstanding issues
 * small node hitzone when creating areas - hitzone and mouseover UI don't match up
 * GPS loading should have a loading... label
 * Pressing undo/redo sometimes doesn't change controllerstate. (e.g. create POI + undo leaves the tag panel still referring to POI)
-* Deleting a way doesn't update the junction highlighting on the remaining junctions
-* Deleting a way also deletes POIs without warning (ooh, look I found a modal dialog in p1. Do I win a prize? :-) )
+* Deleting a way containing POIs leaves the POIs in wrong state (black vs green) - sorts out on mouseover
 
 == Rendering (Halcyon) ==
 
index da51595..191e5ff 100644 (file)
@@ -28,7 +28,9 @@ package net.systemeD.halcyon.connection.actions {
                                node=nodeList.pop();
                                way.dispatchEvent(new WayNodeEvent(Connection.WAY_NODE_REMOVED, node, way, 0));
                                node.removeParent(way);
-                               if (!node.hasParents) { node.remove(effects.push); }
+                if (!node.hasParents && !node.hasInterestingTags()) { //need to trigger redraw of new POIs?
+                  node.remove(effects.push);
+                }
                        }
                        effects.doAction();
                        setDeleted(true);
index 88883c8..23e5671 100644 (file)
@@ -115,6 +115,7 @@ package net.systemeD.potlatch2.controller {
                }
         
                public function deleteWay():ControllerState {
+            controller.map.setHighlightOnNodes(selectedWay, {selectedway: false});
                        selectedWay.remove(MainUndoStack.getGlobalStack().addAction);
                        return new NoSelection();
                }