mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-06 18:14:23 -08:00
Introduce additional checks for playerMenu shortcut activation for judges (#6275)
* Introduce additional checks for playerMenu shortcut activation when they are accessed by a judge, only activating them if the player is a local player. Took 2 hours 7 minutes Took 17 minutes * Undo example change. Took 5 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
@@ -139,7 +139,14 @@ void PlayerMenu::retranslateUi()
|
||||
void PlayerMenu::refreshShortcuts()
|
||||
{
|
||||
if (shortcutsActive) {
|
||||
setShortcutsActive();
|
||||
// Judges get access to every player's menus but only want shortcuts to be set for their own.
|
||||
if (player->getPlayerInfo()->getLocalOrJudge() && !player->getPlayerInfo()->getLocal()) {
|
||||
setShortcutsInactive();
|
||||
} else {
|
||||
setShortcutsActive();
|
||||
}
|
||||
} else {
|
||||
setShortcutsInactive();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user