Taking care to create a copy of the array sent to removeFeatures in the event that the layer.features array is provided. Thanks for the patch bbinet. r=me (closes #2038)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9265 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-04-10 19:22:14 +00:00
parent 119f9bc635
commit ddbf4b5222
2 changed files with 7 additions and 2 deletions

View File

@@ -559,6 +559,9 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
if (!(features instanceof Array)) {
features = [features];
}
if (features === this.features) {
features = features.slice();
}
var notify = !options || !options.silent;