Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
71b670df
Commit
71b670df
authored
Mar 02, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/timeline.qml
View file @
71b670df
...
...
@@ -290,8 +290,8 @@ Rectangle {
function
regainFocus
(
mousePos
)
{
var
currentMouseTrack
=
Logic
.
getTrackIdFromPos
(
mousePos
.
y
-
ruler
.
height
-
subtitleTrack
.
height
+
scrollView
.
contentY
)
// Try to find correct item
console
.
log
(
'
checking item on TK:
'
,
currentMouseTrack
,
'
AT:
'
,
mousePos
,
'
SCROLL POS:
'
,
(
mousePos
.
y
-
ruler
.
height
-
subtitleTrack
.
height
+
scrollView
.
contentY
))
var
tentativeClip
=
getItemAtPos
(
currentMouseTrack
,
mousePos
.
x
-
trackHeaders
.
width
,
dragProxy
.
isComposition
)
//
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
+
scrollView
.
contentX
,
dragProxy
.
isComposition
)
if
(
tentativeClip
&&
tentativeClip
.
clipId
)
{
dragProxy
.
draggedItem
=
tentativeClip
.
clipId
var
tk
=
controller
.
getItemTrackId
(
tentativeClip
.
clipId
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment