Pressing escape hides PreviewUploadOverlay

This commit is contained in:
salahmak 2021-03-20 21:09:04 +01:00
parent 21a649492f
commit 2108d98c6d

View file

@ -207,9 +207,10 @@ PreviewUploadOverlay::setPreview(const QString &path)
void
PreviewUploadOverlay::keyPressEvent(QKeyEvent *event)
{
if( event->key() == Qt::Key_Escape )
{
emit aborted();
close();
if (event->matches(QKeySequence::Cancel)) {
emit aborted();
close();
} else {
QWidget::keyPressEvent(event);
}
}