Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to sort groups using shortcut keys #6999

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/gui/group/GroupView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ GroupView::GroupView(Database* db, QWidget* parent)

new QShortcut(Qt::CTRL + Qt::Key_F10, this, SLOT(contextMenuShortcutPressed()), nullptr, Qt::WidgetShortcut);

// keyboard shortcuts to sort children of a group
auto shortcut = new QShortcut(Qt::CTRL + Qt::Key_Down, this);
connect(shortcut, &QShortcut::activated, this, [this]() { sortGroups(false); });

shortcut = new QShortcut(Qt::CTRL + Qt::Key_Up, this);
connect(shortcut, &QShortcut::activated, this, [this]() { sortGroups(true); });

modelReset();

setDragEnabled(true);
Expand Down