diff --git a/lib/qml/ResultsView.qml b/lib/qml/ResultsView.qml --- a/lib/qml/ResultsView.qml +++ b/lib/qml/ResultsView.qml @@ -70,21 +70,22 @@ id: resultModel queryLimit: 20 - // Internally when the query string changes, the model is reset - // and the results are presented - onModelReset: { - listView.currentIndex = 0 - listView.moved = false - listView.savedMousePosition = Milou.MouseHelper.globalMousePosition() - - if (runAutomatically) { - runCurrentIndex(); - } - } onUpdateSearchTerm: listView.updateQueryString(text, pos) } + // Internally when the query string changes, the model is reset + // and the results are presented + onCountChanged: { + listView.currentIndex = 0 + listView.moved = false + listView.savedMousePosition = Milou.MouseHelper.globalMousePosition() + + if (runAutomatically) { + runCurrentIndex(); + } + } + delegate: ResultDelegate { id: resultDelegate width: listView.width