mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-24 15:25:21 -05: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:
parent
a8a3fca8c9
commit
55aaca0e0d
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user