Don't allow monitor zone below 0 (breaks dragging)

parent b997c77a
Pipeline #1503 passed with stage
in 16 minutes and 18 seconds
......@@ -56,14 +56,16 @@ Rectangle {
hoverEnabled: true
onPressed: {
if (mouse.buttons === Qt.LeftButton) {
controller.requestSeekPosition(Math.min(mouseX / root.timeScale, root.duration));
var pos = Math.max(mouseX, 0)
controller.requestSeekPosition(Math.min(pos / root.timeScale, root.duration));
}
}
onPositionChanged: {
if (mouse.buttons === Qt.LeftButton) {
root.mouseRulerPos = mouseX
var pos = Math.max(mouseX, 0)
root.mouseRulerPos = pos
if (pressed) {
controller.requestSeekPosition(Math.min(mouseX / root.timeScale, root.duration));
controller.requestSeekPosition(Math.min(pos / root.timeScale, root.duration));
}
}
}
......
Markdown is supported
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