Scroll to current item after search

pull/36/head
kateleet 4 years ago
parent bbd19e0410
commit 6ace2da599

@ -1339,6 +1339,8 @@ void FolderModel::keyboardSearch(const QString &text)
if (index >= 0) {
clearSelection();
setSelected(index);
emit scrollToItem(index);
}
}

@ -244,6 +244,7 @@ signals:
void filterMimeTypesChanged();
void selectedItemSizeChanged();
void showHiddenFilesChanged();
void scrollToItem(int index);
void notification(const QString &message);
void move(int x, int y, QList<QUrl> urls);

@ -168,6 +168,11 @@ Item {
function onNotification(text) {
root.showPassiveNotification(text, 3000)
}
// Scroll to item.
function onScrollToItem(index) {
_viewLoader.item.currentIndex = index
}
}
FM.ItemViewAdapter {

Loading…
Cancel
Save