diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index d778e944..98bf07b2 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -1144,6 +1144,13 @@ protected: event->accept(); } } + // clear focus widget while showing to keep global shortcuts working + else if( event->type() == QEvent::Show ) { + QTimer::singleShot( 0, [obj](){ + if( static_cast( obj )->focusWidget() != nullptr ) + static_cast( obj )->focusWidget()->clearFocus(); + } ); + } return QObject::eventFilter( obj, event ); // standard event processing } } diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index 3f8c2055..c3ff5ade 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -624,6 +624,13 @@ protected: return true; } } + // clear focus widget while showing to keep global shortcuts working + else if( event->type() == QEvent::Show ) { + QTimer::singleShot( 0, [obj](){ + if( static_cast( obj )->focusWidget() != nullptr ) + static_cast( obj )->focusWidget()->clearFocus(); + } ); + } return QObject::eventFilter( obj, event ); // standard event processing } }