Skip to content

Commit

Permalink
Correct operation of controls.select.unselectAll when using selection…
Browse files Browse the repository at this point in the history
… storage.
  • Loading branch information
jorix committed Mar 19, 2012
1 parent bb86770 commit 23e4fc9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/FeaturePopups.js
Expand Up @@ -286,12 +286,16 @@ OpenLayers.Control.FeaturePopups = OpenLayers.Class(OpenLayers.Control, {
var self = this;
this.controls.select.unselectAll = OpenLayers.Function.bind(
function (options) {
OpenLayers.Control.SelectFeature.prototype.unselectAll.apply(
this, arguments);
if (!self.refreshSelection && self.safeSelection) {
var safeSelection = (!self.refreshSelection && self.safeSelection);
if (safeSelection) {
self.selectionStorage = {};
}
if (options) {
OpenLayers.Control.SelectFeature.prototype.unselectAll.apply(
this, arguments);
if (options && options.except) {
if (safeSelection) {
self.storeAsSelected(options.except);
}
self.showAllSelectedFeatures();
}
},
Expand Down

0 comments on commit 23e4fc9

Please sign in to comment.