UI: Minor fix.

This commit is contained in:
Nodir Temirkhodjaev 2020-01-09 07:05:01 +05:00
parent c875359d46
commit 6456742e93
2 changed files with 2 additions and 4 deletions

View File

@ -37,8 +37,7 @@ void OptionsWindow::keyPressEvent(QKeyEvent *event)
{ {
if (event->key() == Qt::Key_Escape if (event->key() == Qt::Key_Escape
&& event->modifiers() == Qt::NoModifier && event->modifiers() == Qt::NoModifier
&& !event->isAutoRepeat() && !event->isAutoRepeat()) {
&& this->isActiveWindow()) {
ctrl()->closeWindow(); ctrl()->closeWindow();
} }
} }

View File

@ -76,8 +76,7 @@ void ProgramsWindow::keyPressEvent(QKeyEvent *event)
{ {
if (event->key() == Qt::Key_Escape if (event->key() == Qt::Key_Escape
&& event->modifiers() == Qt::NoModifier && event->modifiers() == Qt::NoModifier
&& !event->isAutoRepeat() && !event->isAutoRepeat()) {
&& this->isActiveWindow()) {
ctrl()->closeWindow(); ctrl()->closeWindow();
} }
} }