mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-09 00:08:43 +01:00
AutoExpandingTreeView: Remove doubleClicked on enter
This commit is contained in:
parent
6a459682ca
commit
a98c209101
@ -155,16 +155,7 @@ void AutoExpandingTreeView::mouseDoubleClickEvent(QMouseEvent *event) {
|
||||
|
||||
void AutoExpandingTreeView::keyPressEvent(QKeyEvent *e) {
|
||||
|
||||
QModelIndex idx = currentIndex();
|
||||
|
||||
switch (e->key()) {
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
if (currentIndex().isValid())
|
||||
emit doubleClicked(currentIndex());
|
||||
e->accept();
|
||||
break;
|
||||
|
||||
case Qt::Key_Backspace:
|
||||
case Qt::Key_Escape:
|
||||
emit FocusOnFilterSignal(e);
|
||||
@ -173,6 +164,7 @@ void AutoExpandingTreeView::keyPressEvent(QKeyEvent *e) {
|
||||
|
||||
case Qt::Key_Left:
|
||||
// Set focus on the root of the current branch
|
||||
const QModelIndex idx = currentIndex();
|
||||
if (idx.isValid() && idx.parent() != rootIndex() && (!isExpanded(idx) || model()->rowCount(idx) == 0)) {
|
||||
setCurrentIndex(idx.parent());
|
||||
setFocus();
|
||||
|
Loading…
x
Reference in New Issue
Block a user