fixed removing of selected items in the "customise toolbar" popup after pressing backspace / delete

This commit is contained in:
Roman Pudashkin 2022-02-14 19:11:17 +02:00
parent e076f00d85
commit 17a3b759bd
3 changed files with 13 additions and 0 deletions

View file

@ -135,6 +135,10 @@ void SelectableItemListModel::removeSelection()
{
TRACEFUNC;
if (!isRemovingAvailable()) {
return;
}
QList<int> selectedRows = m_selection->selectedRows();
if (selectedRows.isEmpty()) {
return;

View file

@ -33,6 +33,7 @@ StyledListView {
signal selectRowRequested(int index)
signal clearSelectionRequested()
signal removeSelectionRequested()
function positionViewAtSelectedItems() {
var selectedIndexes = root.model.selectionModel.selectedIndexes
@ -88,6 +89,10 @@ StyledListView {
root.selectRowRequested(index)
}
onRemoveSelectionRequested: {
root.removeSelectionRequested()
}
navigation.name: item.title
navigation.panel: root.navigationPanel
navigation.row: model.index

View file

@ -116,6 +116,10 @@ StyledPopupView {
onClearSelectionRequested: {
customiseModel.clearSelection()
}
onRemoveSelectionRequested: {
customiseModel.removeSelection()
}
}
}
}