fix macro shortcuts so that Ctrl+1 is not double-assigned (#5112)

This commit is contained in:
Alexander Choi 2024-09-15 14:55:30 -06:00 committed by GitHub
parent 03ec02a749
commit b704216553
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1037,7 +1037,7 @@ void Player::initSayMenu()
for (int i = 0; i < count; ++i) {
auto *newAction = new QAction(SettingsCache::instance().messages().getMessageAt(i), this);
if (i <= 10) {
if (i < 10) {
newAction->setShortcut(QKeySequence("Ctrl+" + QString::number((i + 1) % 10)));
}
connect(newAction, SIGNAL(triggered()), this, SLOT(actSayMessage()));