Skip to content

Commit

Permalink
Merge #5995: fix(qt): tab switching via shortcuts doesn't work after …
Browse files Browse the repository at this point in the history
…5986

c874205 fix(qt): tab switching via shortcuts doesn't work after 5986 (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Looks like 3265b54 (#5986) broke it

  ## What was done?

  ## How Has This Been Tested?
  run dash-qt, try using shortcuts `cmd+1`, `cmd+2` etc. (on macos)

  ## Breaking Changes
  n/a

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    ACK c874205
  kwvg:
    ACK c874205

Tree-SHA512: 62a593ec804d75ff8aada0ef9ea90106adbf8cd11b202a6296086f55c2a4d2181e56dc8e56193a0ed49d94e55ee3236ab441ab477c8ca6d7b0c649dff987dbbc
  • Loading branch information
PastaPastaPasta committed Apr 26, 2024
2 parents f9e123e + c874205 commit b1852e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qt/guiutil.cpp
Expand Up @@ -1612,14 +1612,14 @@ void updateButtonGroupShortcuts(QButtonGroup* buttonGroup)
return;
}
#ifdef Q_OS_MAC
auto modifier = Qt::CTRL;
auto modifier = "Ctrl";
#else
auto modifier = Qt::ALT;
auto modifier = "Alt";
#endif
int nKey = 0;
int nKey = 1;
for (auto button : buttonGroup->buttons()) {
if (button->isVisible()) {
button->setShortcut(QKeySequence(static_cast<int>(modifier) | static_cast<int>(Qt::Key_1) | nKey++));
button->setShortcut(QKeySequence(QString("%1+%2").arg(modifier).arg(nKey++)));
} else {
button->setShortcut(QKeySequence());
}
Expand Down

0 comments on commit b1852e0

Please sign in to comment.