Skip to content

Commit

Permalink
Fix Ctrl+Tab shortcut to cycle databases in unlock dialog
Browse files Browse the repository at this point in the history
When in PR keepassxreboot#8168 the abbility to cycle through the databases in the unlock
dialog was extended to include the `Ctrl+Tab / Ctrl+Shift+Tab` shortcuts,
it mixed up the direction. At the moment `Ctrl+Tab` selects the previous
database, when customarily it should select the next entry. This was my
mistake.

This commit changes the direction of cycling through databases in the
unlock dialog with `Ctrl+Tab / Ctrl+Shift+Tab` fixing my original commit.

Signed-off-by: Daniel Ziegenberg <[email protected]>
  • Loading branch information
ziegenberg committed Nov 25, 2022
1 parent 12be175 commit b113927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/DatabaseOpenDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ DatabaseOpenDialog::DatabaseOpenDialog(QWidget* parent)
auto* shortcut = new QShortcut(Qt::CTRL + Qt::Key_PageUp, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(-1); });
shortcut = new QShortcut(dbTabModifier + Qt::Key_Tab, this);
shortcut = new QShortcut(dbTabModifier + Qt::SHIFT + Qt::Key_Tab, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(-1); });
shortcut = new QShortcut(Qt::CTRL + Qt::Key_PageDown, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(1); });
shortcut = new QShortcut(dbTabModifier + Qt::SHIFT + Qt::Key_Tab, this);
shortcut = new QShortcut(dbTabModifier + Qt::Key_Tab, this);
shortcut->setContext(Qt::WidgetWithChildrenShortcut);
connect(shortcut, &QShortcut::activated, this, [this]() { selectTabOffset(1); });
}
Expand Down

0 comments on commit b113927

Please sign in to comment.