Commit 0343c8bf authored by con's avatar con
Browse files

Fixes: - Using Return in project tree on Mac to open files

parent d4546072
......@@ -90,6 +90,20 @@ protected:
if (event->reason() != Qt::PopupFocusReason)
QTreeView::focusOutEvent(event);
}
#ifdef Q_OS_MAC
void keyPressEvent(QKeyEvent *event)
{
if ((event->key() == Qt::Key_Return
|| event->key() == Qt::Key_Enter)
&& event->modifiers() == 0
&& currentIndex().isValid()) {
emit activated(currentIndex());
return;
}
QTreeView::keyPressEvent(event);
}
#endif
};
/*!
......
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