featuresremoved event is called with zero lenght array if layer.selectedFeature is supplied to layer.removeFeatures, p=igrcic, r,t=me (closes #2379)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9929 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2009-12-27 22:16:56 +00:00
parent be246326ee
commit 442d760fe5
2 changed files with 29 additions and 6 deletions

View File

@@ -581,7 +581,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
if (!(features instanceof Array)) {
features = [features];
}
if (features === this.features) {
if (features === this.features || features === this.selectedFeatures) {
features = features.slice();
}