Skip to content

Commit

Permalink
Fix an issue where preset buttons would always be disabled if Other F…
Browse files Browse the repository at this point in the history
…eatures were hidden (close #5934)
  • Loading branch information
quincylvania committed Feb 25, 2019
1 parent 7a9a07c commit 2d974ca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/renderer/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,12 @@ export function rendererFeatures(context) {
features.isHiddenPreset = function(preset, geometry) {
if (!_hidden.length) return false;
if (!preset.tags) return false;
for (var i = 0; i < _hidden.length; i++) {
if (_features[_hidden[i]].filter(preset.setTags({}, geometry), geometry)) {
return _hidden[i];
for (var key in _features) {
if (_features[key].filter(preset.setTags({}, geometry), geometry)) {
if (_hidden.indexOf(key) !== -1) {
return key;
}
return false;
}
}
return false;
Expand Down

0 comments on commit 2d974ca

Please sign in to comment.