Fix bug where M key stop working in some cases by giving focus to MDI on reset.

This commit is contained in:
Paddle
2023-11-08 13:50:21 +01:00
committed by abdullahtahiriyo
parent 8f3ebe1cc6
commit f035331263

View File

@@ -25,6 +25,7 @@
#include <Base/Tools2D.h>
#include <Gui/EditableDatumLabel.h>
#include <Gui/MDIView.h>
#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;