Update listeners definitions

This commit is contained in:
Luis Ángel San Martín 2022-01-19 18:20:05 +01:00
parent f3e08a04d7
commit 1a25fd0740

View File

@ -54,7 +54,7 @@ Rectangle {
MouseArea { MouseArea {
anchors.fill : list anchors.fill : list
onWheel: { onWheel: wheel => {
if(list.moving) if(list.moving)
return; return;
@ -96,10 +96,11 @@ Rectangle {
highlightMoveDuration: 250 highlightMoveDuration: 250
onCurrentIndexChanged: { onCurrentIndexChanged: currentIndex => {
if (currentIndex !== -1) if (list.currentIndex !== -1) {
currentCoverChanged(currentIndex); mainFlowContainer.currentCoverChanged(list.currentIndex);
} }
}
delegate: Component { delegate: Component {
@ -173,7 +174,7 @@ Rectangle {
currentIndexHelper.selectedItem(index); currentIndexHelper.selectedItem(index);
} }
onReleased: { onReleased: mouse => {
list.currentIndex = index; list.currentIndex = index;
if(mouse.button === Qt.RightButton) // context menu is requested if(mouse.button === Qt.RightButton) // context menu is requested
@ -189,7 +190,7 @@ Rectangle {
} }
focus: true focus: true
Keys.onPressed: { Keys.onPressed: event => {
if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier) if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.ShiftModifier)
return; return;