Apply Erik's patch from #680 to fix "removeFeatures() in Layer.Vector does

not remove features from the selectedFeatures array when deleting features" 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3104 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-05-01 14:09:02 +00:00
parent 937c0032fa
commit e2468e9f09
2 changed files with 10 additions and 1 deletions

View File

@@ -248,6 +248,12 @@ OpenLayers.Layer.Vector.prototype =
this.features = OpenLayers.Util.removeItem(this.features, feature);
this.renderer.eraseGeometry(feature.geometry);
//in the case that this feature is one of the selected features,
// remove it from that array as well.
if (OpenLayers.Util.indexOf(this.selectedFeatures, feature) != -1){
OpenLayers.Util.removeItem(this.selectedFeatures, feature);
}
}
},