X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=patches%2Fopenlayers%2F0003-fixes-2649.patch;fp=patches%2Fopenlayers%2F0003-fixes-2649.patch;h=884b25de069b58299cbe9cf87af2eab07b746ff8;hp=0000000000000000000000000000000000000000;hb=b602b39eea6db7f6d9b912eb6d7c680156ac9d97;hpb=b27131a4de0a72fad65ac9ad370163dba5fce1ad diff --git a/patches/openlayers/0003-fixes-2649.patch b/patches/openlayers/0003-fixes-2649.patch new file mode 100644 index 0000000..884b25d --- /dev/null +++ b/patches/openlayers/0003-fixes-2649.patch @@ -0,0 +1,30 @@ +From 78617274b5acad1d89cb3bbe218b2930f9298ae4 Mon Sep 17 00:00:00 2001 +From: arno +Date: Mon, 21 Mar 2011 20:11:21 +0100 +Subject: [PATCH 3/5] fixes #2649 + +--- + openlayers/lib/OpenLayers/Layer/Vector.js | 7 +++---- + 1 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/openlayers/lib/OpenLayers/Layer/Vector.js b/openlayers/lib/OpenLayers/Layer/Vector.js +index d395d0e..904186f 100644 +--- a/openlayers/lib/OpenLayers/Layer/Vector.js ++++ b/openlayers/lib/OpenLayers/Layer/Vector.js +@@ -762,10 +762,9 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { + * options - {Object} + */ + destroyFeatures: function(features, options) { +- var all = (features == undefined); // evaluates to true if +- // features is null +- if(all) { +- features = this.features; ++ var all = (features == undefined); ++ if(all && this.features) { ++ features = this.features.slice(); + } + if(features) { + this.removeFeatures(features, options); +-- +1.7.4.1 +