Index: lib/filterListener.js |
=================================================================== |
--- a/lib/filterListener.js |
+++ b/lib/filterListener.js |
@@ -46,7 +46,7 @@ |
* This object can be used to change properties of the filter change listeners. |
* @class |
*/ |
-let FilterListener = exports.FilterListener = |
+let FilterListener = |
{ |
/** |
* Set to true when executing many changes, changes will only be fully applied after this variable is set to false again. |
@@ -235,7 +235,12 @@ |
*/ |
function onFilterChange(action, filter, newValue, oldValue) |
{ |
- if (action == "hitCount" || action == "lastHit") |
+ if (action == "hitCount" && newValue == 0) |
+ { |
+ // Filter hits are being reset, make sure these changes are saved. |
+ FilterListener.setDirty(0); |
+ } |
+ else if (action == "hitCount" || action == "lastHit") |
FilterListener.setDirty(0.002); |
else |
FilterListener.setDirty(1); |