Quick GUI: Allow moving entries to the bottom

This commit is contained in:
Martchus 2018-09-02 19:04:28 +02:00
parent 162161d07c
commit 10ab060568
1 changed files with 4 additions and 2 deletions

View File

@ -230,8 +230,10 @@ Kirigami.ScrollablePage {
Kirigami.ListItemDragHandle {
listItem: listItem
listView: entriesListView
onMoveRequested: entryModel.moveRows(rootIndex, oldIndex,
1, rootIndex, newIndex)
// FIXME: not sure why newIndex + 1 is required to be able to move a row at the end
onMoveRequested: entryModel.moveRows(
rootIndex, oldIndex, 1, rootIndex,
oldIndex < newIndex ? newIndex + 1 : newIndex)
}
Kirigami.Icon {
width: Kirigami.Units.iconSizes.smallMedium