mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Merge pull request #3817 from Ultimaker/settings-search-keystroke-timeout
Only trigger settings filter on enter or after 500ms timeout
This commit is contained in:
commit
4a816d5cd2
1 changed files with 14 additions and 0 deletions
|
|
@ -179,6 +179,15 @@ Item
|
||||||
height: visible ? UM.Theme.getSize("setting_control").height : 0
|
height: visible ? UM.Theme.getSize("setting_control").height : 0
|
||||||
Behavior on height { NumberAnimation { duration: 100 } }
|
Behavior on height { NumberAnimation { duration: 100 } }
|
||||||
|
|
||||||
|
Timer
|
||||||
|
{
|
||||||
|
id: settingsSearchTimer
|
||||||
|
onTriggered: filter.editingFinished()
|
||||||
|
interval: 500
|
||||||
|
running: false
|
||||||
|
repeat: false
|
||||||
|
}
|
||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: filter;
|
id: filter;
|
||||||
|
|
@ -201,6 +210,11 @@ Item
|
||||||
property bool lastFindingSettings: false
|
property bool lastFindingSettings: false
|
||||||
|
|
||||||
onTextChanged:
|
onTextChanged:
|
||||||
|
{
|
||||||
|
settingsSearchTimer.restart()
|
||||||
|
}
|
||||||
|
|
||||||
|
onEditingFinished:
|
||||||
{
|
{
|
||||||
definitionsModel.filter = {"i18n_label": "*" + text};
|
definitionsModel.filter = {"i18n_label": "*" + text};
|
||||||
findingSettings = (text.length > 0);
|
findingSettings = (text.length > 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue