mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-07-11 01:24:01 +02:00
RMG-Input: fix dialog not quitting when pressing esc
This commit is contained in:
@@ -24,11 +24,21 @@ bool EventFilter::eventFilter(QObject *object, QEvent *event)
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::Type::KeyPress:
|
||||
emit this->on_EventFilter_KeyPressed((QKeyEvent *)event);
|
||||
return true;
|
||||
{
|
||||
if (((QKeyEvent *)event)->key() != Qt::Key_Escape)
|
||||
{
|
||||
emit this->on_EventFilter_KeyPressed((QKeyEvent *)event);
|
||||
return true;
|
||||
}
|
||||
} break;
|
||||
case QEvent::Type::KeyRelease:
|
||||
emit this->on_EventFilter_KeyReleased((QKeyEvent *)event);
|
||||
return true;
|
||||
{
|
||||
if (((QKeyEvent *)event)->key() != Qt::Key_Escape)
|
||||
{
|
||||
emit this->on_EventFilter_KeyReleased((QKeyEvent *)event);
|
||||
return true;
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user