aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-08-29 09:15:29 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-08-29 09:20:17 +0200
commita403a0ccfac410f8f2fde4100c16ac536c826ad7 (patch)
tree7aaebce594a60b41f1149f644ab0893daef99673
parent998a904d9b60976ec0cf35b83836e0abd5ea8b7a (diff)
Age filter: Unconditionally call changed().HEADmaster
Not just when `ageFilterSettings._active !== active`. The user can change the filter interval without canceling the filter altogether, and that should trigger a redraw event. The redraw might be unnecessary if _active and ._min_ts and/or ._max_ts are unchanged, but it's not worth making a check for that.
-rw-r--r--main.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/main.js b/main.js
index 8a6d8f5..60233de 100644
--- a/main.js
+++ b/main.js
@@ -5927,13 +5927,11 @@ const ageFilterSetActive = (function() {
.forEach((lyr) => lyr.changed());
};
const setter = function(active) {
- if (ageFilterSettings._active !== active) {
- if (active) {
- ageFilterSettings.setupMinMax();
- }
- ageFilterSettings._active = active;
- changed();
+ if (active) {
+ ageFilterSettings.setupMinMax();
}
+ ageFilterSettings._active = active;
+ changed();
if (active && ageFilterSettings.type === 'relative') {
if (timeoutID == null) {
timeoutID = setTimeout(fun, getDelay(state)[0]);