mirror of
https://github.com/leozide/leocad.git
synced 2026-10-26 22:10:32 +00:00
Fix keyboard focus after dropping parts from floating docks
Dragging a part from a floating Parts window can leave that window active after the drop. Setting focus on the model view alone does not activate its window, so movement shortcuts remain in the Parts list until the model is clicked. Activate the receiving window before focusing the view after accepted part or color drops so keyboard commands can reach the model immediately. Fixes #1040.
This commit is contained in:
1 parent
688859b120
commit
c6dd2c45c1
1 file changed
+1
@@ -370,6 +370,7 @@ void lcViewWidget::dropEvent(QDropEvent* DropEvent)
|
||||
if (MimeData->hasFormat("application/vnd.leocad-part") || MimeData->hasFormat("application/vnd.leocad-color"))
|
||||
{
|
||||
mView->EndDrag(true);
|
||||
window()->activateWindow();
|
||||
setFocus(Qt::MouseFocusReason);
|
||||
|
||||
DropEvent->accept();
|
||||
|
||||
Reference in new issue
Block a user