From 94810299609b3c90c91bfe3e05fe5f6e3d08f8ba Mon Sep 17 00:00:00 2001 From: lordmulder Date: Thu, 19 Apr 2012 00:56:04 +0200 Subject: [PATCH] Make it possible to remove items with the DEL key. --- src/Config.h | 2 +- src/Dialog_MainWindow.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Config.h b/src/Config.h index 674eeb7b..92b62fa8 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_TYPE RC #define VER_LAMEXP_PATCH 2 -#define VER_LAMEXP_BUILD 982 +#define VER_LAMEXP_BUILD 983 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index d8b8d6c1..122aa074 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -862,6 +862,15 @@ void MainWindow::keyPressEvent(QKeyEvent *e) } } + if(e->key() == Qt::Key_Delete) + { + if(sourceFileView->isVisible()) + { + QTimer::singleShot(0, this, SLOT(removeFileButtonClicked())); + return; + } + } + QMainWindow::keyPressEvent(e); } -- 2.11.0