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

Fix several cases of timeline losing focus

parent 62cf0613
Pipeline #160751 passed with stage
in 13 minutes and 15 seconds
......@@ -1864,6 +1864,9 @@ Rectangle {
timeline.showToolTip()
//bubbleHelp.hide()
tracksArea.focus = true
if (!dragProxyArea.containsMouse) {
regainFocus(dragProxyArea.mapToItem(root,mouseX, mouseY))
}
}
}
onDoubleClicked: {
......
......@@ -430,10 +430,14 @@ void TimelineWidget::slotUngrabHack()
// Reset menu position, necessary if user closes the menu without selecting any action
rootObject()->setProperty("clickFrame", -1);
});
if (quickWindow() && quickWindow()->mouseGrabberItem()) {
quickWindow()->mouseGrabberItem()->ungrabMouse();
QPoint mousePos = mapFromGlobal(QCursor::pos());
QMetaObject::invokeMethod(rootObject(), "regainFocus", Qt::DirectConnection, Q_ARG(QVariant, mousePos));
if (quickWindow()) {
if (quickWindow()->mouseGrabberItem()) {
quickWindow()->mouseGrabberItem()->ungrabMouse();
QPoint mousePos = mapFromGlobal(QCursor::pos());
QMetaObject::invokeMethod(rootObject(), "regainFocus", Qt::DirectConnection, Q_ARG(QVariant, mousePos));
} else {
QMetaObject::invokeMethod(rootObject(), "endDrag", Qt::DirectConnection);
}
}
}
......
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