Release mouse if Qt doesn't receive mouse release
As explained in commit message for #166, there's a case where Qt doesn't receive the mouse release from Windows. If that happens then allow to drop if we're over a drop indicator. Fixes issue #306
This commit is contained in:
@@ -263,6 +263,7 @@ StateDragging::StateDragging(DragController *parent)
|
||||
if (!mouseButtonIsReallyDown && isLeftButtonPressed()) {
|
||||
qCDebug(state) << "Canceling drag, Qt thinks mouse button is pressed"
|
||||
<< "but Windows knows it's not";
|
||||
handleMouseButtonRelease(QCursor::pos());
|
||||
Q_EMIT q->dragCanceled();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user