1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 11:34:59 +00:00

LibGUI: Display commands on CommandPalette's start up

Currently, if we run CommandPalette, it's blank by default and it's not
displaying all available commands for the app in which it has been
opened. User has to enter something and then delete it to see
all commands. This patch makes all available commands being displayed
by default on start of CommandPalette, by allowing incoming empty
string to be invalidated in FilteringProxyModel, instead of returning
instantly.
This commit is contained in:
tetektoza 2023-12-10 22:00:19 +01:00 committed by Andreas Kling
parent b0e5aadf1a
commit 3ff36855d4

View file

@ -94,7 +94,7 @@ void FilteringProxyModel::filter()
void FilteringProxyModel::set_filter_term(StringView term) void FilteringProxyModel::set_filter_term(StringView term)
{ {
if (m_filter_term == term) if (m_filter_term == term && !term.is_empty())
return; return;
m_filter_term = term; m_filter_term = term;
invalidate(); invalidate();