]> dev.renevier.net Git - syj.git/blob - patches/openlayers/0003-fixes-2649.patch
fixes logic error in div.addMessage method
[syj.git] / patches / openlayers / 0003-fixes-2649.patch
1 From 78617274b5acad1d89cb3bbe218b2930f9298ae4 Mon Sep 17 00:00:00 2001
2 From: arno <arno@renevier.net>
3 Date: Mon, 21 Mar 2011 20:11:21 +0100
4 Subject: [PATCH 3/5] fixes #2649
5
6 ---
7  openlayers/lib/OpenLayers/Layer/Vector.js |    7 +++----
8  1 files changed, 3 insertions(+), 4 deletions(-)
9
10 diff --git a/openlayers/lib/OpenLayers/Layer/Vector.js b/openlayers/lib/OpenLayers/Layer/Vector.js
11 index d395d0e..904186f 100644
12 --- a/openlayers/lib/OpenLayers/Layer/Vector.js
13 +++ b/openlayers/lib/OpenLayers/Layer/Vector.js
14 @@ -762,10 +762,9 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
15       * options - {Object}
16       */
17      destroyFeatures: function(features, options) {
18 -        var all = (features == undefined); // evaluates to true if
19 -                                           // features is null
20 -        if(all) {
21 -            features = this.features;
22 +        var all = (features == undefined);
23 +        if(all && this.features) {
24 +            features = this.features.slice();
25          }
26          if(features) {
27              this.removeFeatures(features, options);
28 -- 
29 1.7.4.1
30