From 2b367f84da2723ee83274487c309dacf4bda442a Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Fri, 26 May 2023 20:20:37 +0300 Subject: [PATCH] UI: Close windows by Escape key immediately --- src/ui/util/window/widgetwindow.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ui/util/window/widgetwindow.cpp b/src/ui/util/window/widgetwindow.cpp index 919aad9a..a28b6480 100644 --- a/src/ui/util/window/widgetwindow.cpp +++ b/src/ui/util/window/widgetwindow.cpp @@ -53,11 +53,8 @@ void WidgetWindow::keyPressEvent(QKeyEvent *event) { QWidget::keyPressEvent(event); - if (event->isAutoRepeat()) - return; - switch (event->key()) { - case Qt::Key_Escape: // Esc + case Qt::Key_Escape: if (event->modifiers() == Qt::NoModifier) { close(); }