Overview: Fix clear button working in overview search

onTextEdited only updates on user-invoked key presses, and not
programatic changes.

This is a better choice when we have a two-way bindings such  as with
configuration files, but in this case we always want the UI to reflect
the current contents of the search box making onTextChanged the better
signal.

BUG: 475789
master
David Edmundson 11 months ago
parent 6033d2d14e
commit 4bdb94c87f

@ -264,7 +264,8 @@ FocusScope {
Keys.priority: Keys.BeforeItem
Keys.forwardTo: text && (allDesktopHeaps.currentHeap.count === 0 || !effect.filterWindows) ? searchResults : allDesktopHeaps.currentHeap
text: effect.searchText
onTextEdited: {
// not onTextEdited so that the UI always stays in sync
onTextChanged: {
effect.searchText = text;
allDesktopHeaps.currentHeap.resetSelected();
allDesktopHeaps.currentHeap.selectNextItem(WindowHeap.Direction.Down);

Loading…
Cancel
Save