diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h index f13bca80e9..918419574f 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h @@ -747,6 +747,13 @@ private: tryAutoRecomputeIfNotSolve(sketchgui->getSketchObject()); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Add Sketch B-Spline")); + // Restore keyboard focus after command restart + if (Gui::Document* doc = Gui::Application::Instance->activeDocument()) { + if (Gui::MDIView* mdi = doc->getActiveView()) { + mdi->setFocus(); + } + } + // Add the necessary alignment geometries and constraints for (size_t i = 0; i < geoIds.size(); ++i) { addGeometry(points[i], geoIds[i], i == 0);