Make pressing return in the library view the same as double clicking
This commit is contained in:
parent
51b5e7d607
commit
a207a3def5
|
@ -316,3 +316,15 @@ void LibraryView::CopyToDevice() {
|
|||
organise_dialog_->SetFilenames(filenames, size);
|
||||
organise_dialog_->show();
|
||||
}
|
||||
|
||||
void LibraryView::keyReleaseEvent(QKeyEvent* e) {
|
||||
switch (e->key()) {
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
if (currentIndex().isValid())
|
||||
emit doubleClicked(currentIndex());
|
||||
break;
|
||||
}
|
||||
|
||||
QTreeView::keyReleaseEvent(e);
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ class LibraryView : public AutoExpandingTreeView {
|
|||
void paintEvent(QPaintEvent* event);
|
||||
void mouseReleaseEvent(QMouseEvent* e);
|
||||
void contextMenuEvent(QContextMenuEvent* e);
|
||||
void keyReleaseEvent(QKeyEvent* e);
|
||||
|
||||
private slots:
|
||||
void Load();
|
||||
|
|
Loading…
Reference in New Issue