diff options
-rwxr-xr-x | indra/newview/llinventoryfilter.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 1d788321b8..0bbb4aeeff 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -646,10 +646,14 @@ void LLInventoryFilter::setHoursAgo(U32 hours) bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo && !isSinceLogoff(); // *NOTE: need to cache last filter time, in case filter goes stale - BOOL less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours); - BOOL more_restrictive = (are_date_limits_valid && (!is_increasing && hours) || is_increasing_from_zero); - - if (FILTERDATEDIRECTION_OLDER == mFilterOps.mDateSearchDirection) + BOOL less_restrictive; + BOOL more_restrictive; + if (FILTERDATEDIRECTION_NEWER == mFilterOps.mDateSearchDirection) + { + less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours); + more_restrictive = (are_date_limits_valid && (!is_increasing && hours) || is_increasing_from_zero); + } + else { less_restrictive = (are_date_limits_valid && ((is_decreasing && mFilterOps.mHoursAgo)) || !hours); more_restrictive = (are_date_limits_valid && (!is_decreasing && hours) || is_increasing_from_zero); |