Don't update global menu on Linux without focus widget

The window loses focus when menu is open and edit options are deactivated
This commit is contained in:
Ilya Fedin 2022-05-20 23:33:22 +04:00 committed by John Preston
parent 4410aeb3eb
commit 4d997a26b0

View file

@ -568,9 +568,11 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *evt) {
if (qobject_cast<QLineEdit*>(obj)
|| qobject_cast<QTextEdit*>(obj)
|| dynamic_cast<HistoryInner*>(obj)) {
if (QApplication::focusWidget()) {
updateGlobalMenu();
}
}
}
return Window::MainWindow::eventFilter(obj, evt);
}