Skip to content

Commit

Permalink
Add feature to sort groups using shortcut keys (#6999)
Browse files Browse the repository at this point in the history
* Register Ctrl + Down to sort A->Z and Ctrl + Up to sort Z->A
  • Loading branch information
pruthig authored Oct 1, 2021
1 parent 6d1fc31 commit 405d3ee
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 405d3ee

Please sign in to comment.