From 6456742e93a82f4847ab80e466982a2f1633f99c Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Thu, 9 Jan 2020 07:05:01 +0500 Subject: [PATCH] UI: Minor fix. --- src/ui/form/opt/optionswindow.cpp | 3 +-- src/ui/form/prog/programswindow.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ui/form/opt/optionswindow.cpp b/src/ui/form/opt/optionswindow.cpp index e3cc2d13..c4eaa579 100644 --- a/src/ui/form/opt/optionswindow.cpp +++ b/src/ui/form/opt/optionswindow.cpp @@ -37,8 +37,7 @@ void OptionsWindow::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape && event->modifiers() == Qt::NoModifier - && !event->isAutoRepeat() - && this->isActiveWindow()) { + && !event->isAutoRepeat()) { ctrl()->closeWindow(); } } diff --git a/src/ui/form/prog/programswindow.cpp b/src/ui/form/prog/programswindow.cpp index 4e944a06..d5e6f2c4 100644 --- a/src/ui/form/prog/programswindow.cpp +++ b/src/ui/form/prog/programswindow.cpp @@ -76,8 +76,7 @@ void ProgramsWindow::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape && event->modifiers() == Qt::NoModifier - && !event->isAutoRepeat() - && this->isActiveWindow()) { + && !event->isAutoRepeat()) { ctrl()->closeWindow(); } }