Commit 227b9c76 authored by Marco Martin's avatar Marco Martin
Browse files

map delegate pos to parent

should avoid the second page items to be selected
CCBUG:314553
parent 088f40eb
......@@ -50,6 +50,7 @@ Item {
id: selectedModel
signal modelCleared
}
Connections {
target: metadataModel
onModelReset: {
......@@ -223,8 +224,10 @@ Item {
imagePath: "widgets/viewitem"
prefix: "selected+hover"
anchors.fill: parent
property real delegateX: resultsGrid.mapFromItem(resourceDelegate, 0, 0).x
property real delegateY: resultsGrid.mapFromItem(resourceDelegate, 0, 0).y
property bool contains: resourceDelegate.x+resourceDelegate.width > selectionRect.x && resourceDelegate.y+resourceDelegate.height > selectionRect.y && resourceDelegate.x < selectionRect.x+selectionRect.width && resourceDelegate.y < selectionRect.y+selectionRect.height
property bool contains: delegateX+resourceDelegate.width > selectionRect.x && delegateY+resourceDelegate.height > selectionRect.y && delegateX < selectionRect.x+selectionRect.width && delegateY < selectionRect.y+selectionRect.height
opacity: 0
/*Behavior on opacity {
NumberAnimation {duration: 250}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment