Set focus to sketcher window when a new handler is activated to ensure proper handling of keys, espcially Escape.
This commit is contained in:
@@ -374,6 +374,12 @@ void ViewProviderSketch::activateHandler(DrawSketchHandler *newHandler)
|
||||
Mode = STATUS_SKETCH_UseHandler;
|
||||
edit->sketchHandler->sketchgui = this;
|
||||
edit->sketchHandler->activated(this);
|
||||
|
||||
// make sure receiver has focus so immediately pressing Escape will be handled by
|
||||
// ViewProviderSketch::keyPressed() and dismiss the active handler, and not the entire
|
||||
// sketcher editor
|
||||
Gui::MDIView *mdi = Gui::Application::Instance->activeDocument()->getActiveView();
|
||||
mdi->setFocus();
|
||||
}
|
||||
|
||||
void ViewProviderSketch::deactivateHandler()
|
||||
|
||||
Reference in New Issue
Block a user