From c6dd2c45c117370457c9101064d5332ca6382a92 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Fri, 23 Oct 2026 14:42:54 -0700 Subject: [PATCH] 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. --- common/lc_viewwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/lc_viewwidget.cpp b/common/lc_viewwidget.cpp index dbecbc5e..58b952c7 100644 --- a/common/lc_viewwidget.cpp +++ b/common/lc_viewwidget.cpp @@ -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();