Timeline: Pass the right dragOffset to CategoryLabels

Also, make sure the category dragger only reacts to vertical mouse
movements.

Change-Id: Ic53db9030536a1f2d35ea02facb920a4d3f0a005
Task-number: QTCREATORBUG-15333
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-11-12 12:05:45 +01:00
parent 7fb4315da2
commit 7d87b9cd97
2 changed files with 2 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ Item {
cursorShape: dragging ? Qt.ClosedHandCursor : Qt.OpenHandCursor
drag.minimumY: dragging ? 0 : -dragOffset // Account for parent change below
drag.maximumY: draggerParent.height - (dragging ? 0 : dragOffset)
drag.axis: Drag.YAxis
}
DropArea {

View File

@@ -102,7 +102,7 @@ Flickable {
draggerParent: categories
width: 150
height: parent.height
dragOffset: parent.y
dragOffset: loader.y
onDropped: {
categories.moveCategories(sourceIndex, targetIndex);