Commit 71b670df authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix focus on item under mouse after switching back from another app

parent 7a6af178
Pipeline #52931 passed with stage
in 11 minutes and 53 seconds
...@@ -290,8 +290,8 @@ Rectangle { ...@@ -290,8 +290,8 @@ Rectangle {
function regainFocus(mousePos) { function regainFocus(mousePos) {
var currentMouseTrack = Logic.getTrackIdFromPos(mousePos.y - ruler.height - subtitleTrack.height + scrollView.contentY) var currentMouseTrack = Logic.getTrackIdFromPos(mousePos.y - ruler.height - subtitleTrack.height + scrollView.contentY)
// Try to find correct item // Try to find correct item
console.log('checking item on TK: ', currentMouseTrack, ' AT: ', mousePos, ' SCROLL POS: ', (mousePos.y - ruler.height - subtitleTrack.height + scrollView.contentY)) //console.log('checking item on TK: ', currentMouseTrack, ' AT: XPOS', (mousePos.x - trackHeaders.width), ', SCOLL:', scrollView.contentX, ', RES: ', ((mousePos.x - trackHeaders.width + scrollView.contentX) / timeline.scaleFactor), ' SCROLL POS: ', (mousePos.y - ruler.height - subtitleTrack.height + scrollView.contentY))
var tentativeClip = getItemAtPos(currentMouseTrack, mousePos.x - trackHeaders.width, dragProxy.isComposition) var tentativeClip = getItemAtPos(currentMouseTrack, mousePos.x - trackHeaders.width + scrollView.contentX, dragProxy.isComposition)
if (tentativeClip && tentativeClip.clipId) { if (tentativeClip && tentativeClip.clipId) {
dragProxy.draggedItem = tentativeClip.clipId dragProxy.draggedItem = tentativeClip.clipId
var tk = controller.getItemTrackId(tentativeClip.clipId) var tk = controller.getItemTrackId(tentativeClip.clipId)
......
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