Button applying QuickFilter - doesn't appear pressed when flags used?

I have a button that runs the following command:

Set QUICKFILTER=(*.exe)

When I press it the filter toggles between set and unset and my button appears in a pressed state when the filter is active.

However, if I change the button command to the following:

Set QUICKFILTER=(*.exe) QUICKFILTERFLAGS=showdirs

The filter is still set/unset when clicking the button, but the button no longer appears in a pressed state when the filter is active.

Any idea why this is?

You could solve that with @toggle, but you'd then run into another issue: The command is toggling the pattern and the flag independently of each other, which means they will go out of sync. This fixes that as well:

@toggle:if Set QUICKFILTER=*.exe
@if:Set QUICKFILTER=*.exe
Set QUICKFILTERCLEAR
@if:else
Set QUICKFILTERCLEAR
Set QUICKFILTERFLAGS=showdirs QUICKFILTER=*.exe

Thank you @Leo, that does what I'm after.

However, I've now been made aware of @if:Set and am imagining a new world of possibilities! :grinning:

1 Like