Commit 608ec497 authored by Olli Werwolff's avatar Olli Werwolff
Browse files

Fixes: Resources in resource editor can be removed using the "delete" key

Task:     -
RevBy:    thorbjorn
AutoTest: -
Details:  -
parent e4e26a91
...@@ -382,6 +382,14 @@ void ResourceView::mouseReleaseEvent(QMouseEvent *e) ...@@ -382,6 +382,14 @@ void ResourceView::mouseReleaseEvent(QMouseEvent *e)
QTreeView::mouseReleaseEvent(e); QTreeView::mouseReleaseEvent(e);
} }
void ResourceView::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Delete)
removeItem();
else
QTreeView::keyPressEvent(e);
}
void ResourceView::popupMenu(const QModelIndex &index) void ResourceView::popupMenu(const QModelIndex &index)
{ {
if (!m_releasePos.isNull()) { if (!m_releasePos.isNull()) {
......
...@@ -138,6 +138,7 @@ protected: ...@@ -138,6 +138,7 @@ protected:
void changeLang(const QModelIndex &index); void changeLang(const QModelIndex &index);
void changeAlias(const QModelIndex &index); void changeAlias(const QModelIndex &index);
void mouseReleaseEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *e);
signals: signals:
void removeItem(); void removeItem();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment