Pressing escape hides PreviewUploadOverlay

pull/532/head
salahmak 4 years ago
parent 21a649492f
commit 2108d98c6d
  1. 9
      src/dialogs/PreviewUploadOverlay.cpp

@ -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);
}
}
Loading…
Cancel
Save