mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #5995: fix(qt): tab switching via shortcuts doesn't work after 5986
c8742057ac
fix(qt): tab switching via shortcuts doesn't work after 5986 (UdjinM6) Pull request description: ## Issue being fixed or feature implemented Looks like3265b54a2f
(#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: ACKc8742057ac
kwvg: ACKc8742057ac
Tree-SHA512: 62a593ec804d75ff8aada0ef9ea90106adbf8cd11b202a6296086f55c2a4d2181e56dc8e56193a0ed49d94e55ee3236ab441ab477c8ca6d7b0c649dff987dbbc
This commit is contained in:
commit
b1852e0a89
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user