From f035331263b4be19367148dbb7db4ff7e21344a5 Mon Sep 17 00:00:00 2001 From: Paddle Date: Wed, 8 Nov 2023 13:50:21 +0100 Subject: [PATCH] Fix bug where M key stop working in some cases by giving focus to MDI on reset. --- src/Mod/Sketcher/Gui/DrawSketchController.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Mod/Sketcher/Gui/DrawSketchController.h b/src/Mod/Sketcher/Gui/DrawSketchController.h index 74b2bac0a8..a0f6ed12e1 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchController.h +++ b/src/Mod/Sketcher/Gui/DrawSketchController.h @@ -25,6 +25,7 @@ #include #include +#include #include "DrawSketchDefaultHandler.h" #include "SketcherToolDefaultWidget.h" @@ -278,6 +279,10 @@ public: /** @brief Resets the controls, such as the widget and the on-view parameters */ void resetControls() { + // Make sure we do not loose focus if next methode does not have OVP that take focus. + Gui::MDIView* mdi = Gui::Application::Instance->activeDocument()->getActiveView(); + mdi->setFocus(); + doResetControls(); // NVI firstMoveInit = false;