mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Pressing escape hides PreviewUploadOverlay
This commit is contained in:
parent
21a649492f
commit
2108d98c6d
1 changed files with 5 additions and 4 deletions
|
@ -207,9 +207,10 @@ PreviewUploadOverlay::setPreview(const QString &path)
|
||||||
void
|
void
|
||||||
PreviewUploadOverlay::keyPressEvent(QKeyEvent *event)
|
PreviewUploadOverlay::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
if( event->key() == Qt::Key_Escape )
|
if (event->matches(QKeySequence::Cancel)) {
|
||||||
{
|
emit aborted();
|
||||||
emit aborted();
|
close();
|
||||||
close();
|
} else {
|
||||||
|
QWidget::keyPressEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue