add the ability to lock entities against purging
[potlatch2.git] / net / systemeD / halcyon / connection / Connection.as
index 1000951ff532577753ecd990fd45b3283a0cc52b..3afe045792b9bab597a8ac3f30f7dc17246a48e9 100644 (file)
@@ -312,12 +312,12 @@ package net.systemeD.halcyon.connection {
 
                public function purgeOutside(left:Number, right:Number, top:Number, bottom:Number):void {
                        for each (var way:Way in ways) {
-                               if (!way.within(left,right,top,bottom) && !way.isDirty) {
+                               if (!way.within(left,right,top,bottom) && !way.isDirty && !way.locked && !way.hasLockedNodes()) {
                                        killWayWithNodes(way.id);
                                }
                        }
                        for each (var poi:Node in pois) {
-                               if (!poi.within(left,right,top,bottom) && !poi.isDirty) {
+                               if (!poi.within(left,right,top,bottom) && !poi.isDirty && !poi.locked) {
                                        killNode(poi.id);
                                }
                        }