Fix setDropIndicatorsInhibited(false) not showing drop indicators
It required the user to move the mouse, which was OK but we can do better. Now, KDDW will automaticallt re-show the drop indicators if we're in the middle of a drag operation. Required for issue #334 and issue #337
This commit is contained in:
@@ -31,10 +31,14 @@ DropIndicatorOverlayInterface::DropIndicatorOverlayInterface(DropArea *dropArea)
|
||||
|
||||
connect(DockRegistry::self(), &DockRegistry::dropIndicatorsInhibitedChanged, this,
|
||||
[this](bool inhibited) {
|
||||
if (inhibited)
|
||||
if (inhibited) {
|
||||
removeHover();
|
||||
|
||||
// if false then simply moving the mouse will make the drop indicators appear again
|
||||
} else {
|
||||
// Re-add hover. Fastest way is simply faking a mouse move
|
||||
if (auto state = qobject_cast<StateDragging *>(DragController::instance()->activeState())) {
|
||||
state->handleMouseMove(QCursor::pos());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user