Skip to content

Commit

Permalink
Only perform group sort when GroupView is focused
Browse files Browse the repository at this point in the history
* Fixes #10195
  • Loading branch information
droidmonkey committed Apr 26, 2024
1 parent 994c5b7 commit bb856f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/topics/KeyboardShortcuts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ NOTE: On macOS please substitute `Ctrl` with `Cmd` (aka `⌘`).
|Trigger AutoType | Ctrl + Shift + V
|Add key to SSH Agent | Ctrl + H
|Remove key from SSH Agent | Ctrl + Shift + H
|Move entry up (if unsorted) | Ctrl + Alt + Up
|Move entry down (if unsorted) | Ctrl + Alt + Down
|Sort Groups A-Z | Ctrl + Down
|Sort Groups Z-A | Ctrl + Up
|Minimize Window | Ctrl + M
|Hide Window | Ctrl + Shift + M
|Select Next Database Tab | Ctrl + Tab ; Ctrl + PageDn
Expand Down
4 changes: 2 additions & 2 deletions src/gui/group/GroupView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ 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);
auto shortcut = new QShortcut(Qt::CTRL + Qt::Key_Down, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { sortGroups(false); });

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

modelReset();
Expand Down

0 comments on commit bb856f8

Please sign in to comment.