Gui: Use postEvent instead of sendEvent for Esc handling

See https://github.com/FreeCAD/FreeCAD/pull/24277#issuecomment-3342091132

Co-authored-by: wwmayer <wmayer@freecad.org>
This commit is contained in:
Chris Hennes
2025-10-23 14:39:31 -05:00
parent 503ef79cea
commit f6f919d229

View File

@@ -239,7 +239,7 @@ void ViewProvider::eventCallback(void * ud, SoEventCallback * node)
DockWindowManager* pDockMgr = DockWindowManager::instance();
if (QWidget* widget = pDockMgr->getDockWindow("Tasks")) {
QKeyEvent ev(QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier);
qApp->sendEvent(widget, &ev);
qApp->postEvent(widget, &ev);
}
auto func = new Gui::TimerFunction();