diff --git a/cockatrice/src/client/settings/shortcuts_settings.h b/cockatrice/src/client/settings/shortcuts_settings.h index f136fc520..987e373c1 100644 --- a/cockatrice/src/client/settings/shortcuts_settings.h +++ b/cockatrice/src/client/settings/shortcuts_settings.h @@ -597,8 +597,6 @@ private: {"Player/aViewBottomCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Bottom Cards of Library"), parseSequenceString("Ctrl+Shift+W"), ShortcutGroup::View)}, - {"Player/aViewCommandZone", - ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Command Zone"), parseSequenceString(""), ShortcutGroup::View)}, {"Player/aAddCommanderTax", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Increase Commander Tax"), parseSequenceString(""), ShortcutGroup::Player_Counters)}, diff --git a/cockatrice/src/game_graphics/player/menu/command_zone_menu.cpp b/cockatrice/src/game_graphics/player/menu/command_zone_menu.cpp index 66abc7525..c1f537b7d 100644 --- a/cockatrice/src/game_graphics/player/menu/command_zone_menu.cpp +++ b/cockatrice/src/game_graphics/player/menu/command_zone_menu.cpp @@ -11,28 +11,16 @@ #include #include -#include CommandZoneMenu::CommandZoneMenu(PlayerGraphicsItem *_player, QMenu *playerMenu) : QMenu(playerMenu), player(_player) { - viewZoneShortcutKey = QStringLiteral("Player/aViewCommandZone"); incTaxShortcutKey = QStringLiteral("Player/aAddCommanderTax"); decTaxShortcutKey = QStringLiteral("Player/aRemoveCommanderTax"); incPartnerTaxShortcutKey = QStringLiteral("Player/aAddPartnerTax"); decPartnerTaxShortcutKey = QStringLiteral("Player/aRemovePartnerTax"); - aViewZone = new QAction(this); - connect(aViewZone, &QAction::triggered, this, [this]() { - if (PlayerLogic *logic = player->getLogic()) { - emit logic->requestZoneViewToggle(logic, ZoneNames::COMMAND, -1, false); - } - }); - PlayerLogic *logic = player->getLogic(); if (logic && logic->getPlayerInfo()->getLocalOrJudge()) { - addAction(aViewZone); - addSeparator(); - aIncreaseCommanderTax = new QAction(this); connect(aIncreaseCommanderTax, &QAction::triggered, this, [this]() { if (auto *logic = player->getLogic()) { @@ -100,9 +88,6 @@ CommandZoneMenu::CommandZoneMenu(PlayerGraphicsItem *_player, QMenu *playerMenu) void CommandZoneMenu::retranslateUi() { setTitle(tr("Co&mmander")); - if (aViewZone) { - aViewZone->setText(tr("&View command zone")); - } if (aIncreaseCommanderTax) { aIncreaseCommanderTax->setText(tr("&Increase Commander Tax (+1)")); } @@ -166,9 +151,6 @@ void CommandZoneMenu::setShortcutsActive() { ShortcutsSettings &shortcuts = SettingsCache::instance().shortcuts(); - if (aViewZone) { - aViewZone->setShortcuts(shortcuts.getShortcut(viewZoneShortcutKey)); - } if (aIncreaseCommanderTax) { aIncreaseCommanderTax->setShortcuts(shortcuts.getShortcut(incTaxShortcutKey)); } @@ -185,9 +167,6 @@ void CommandZoneMenu::setShortcutsActive() void CommandZoneMenu::setShortcutsInactive() { - if (aViewZone) { - aViewZone->setShortcut(QKeySequence()); - } if (aIncreaseCommanderTax) { aIncreaseCommanderTax->setShortcut(QKeySequence()); } diff --git a/cockatrice/src/game_graphics/player/menu/command_zone_menu.h b/cockatrice/src/game_graphics/player/menu/command_zone_menu.h index cdd2056cc..7b87f9c78 100644 --- a/cockatrice/src/game_graphics/player/menu/command_zone_menu.h +++ b/cockatrice/src/game_graphics/player/menu/command_zone_menu.h @@ -18,8 +18,7 @@ class PlayerGraphicsItem; * @brief Context menu for the command zone. * * Appears when right-clicking on the command zone. Provides actions for - * viewing zone contents, adjusting the commander tax counter, and - * toggling minimized state. + * adjusting the commander tax counter and toggling minimized state. * * @see PlayerMenu * @see CommandZone @@ -34,8 +33,6 @@ public: void setShortcutsActive() override; void setShortcutsInactive() override; - QAction *aViewZone = nullptr; ///< Opens a zone viewer for the command zone - private: QAction *aIncreaseCommanderTax = nullptr; ///< Increments the primary commander tax counter QAction *aDecreaseCommanderTax = nullptr; ///< Decrements the primary commander tax counter @@ -52,7 +49,6 @@ private: void updateTaxCounterActionStates(); PlayerGraphicsItem *player; - QString viewZoneShortcutKey; QString incTaxShortcutKey; QString decTaxShortcutKey; QString incPartnerTaxShortcutKey; diff --git a/cockatrice/src/game_graphics/player/menu/player_menu.cpp b/cockatrice/src/game_graphics/player/menu/player_menu.cpp index 071c85210..afd3e8aca 100644 --- a/cockatrice/src/game_graphics/player/menu/player_menu.cpp +++ b/cockatrice/src/game_graphics/player/menu/player_menu.cpp @@ -83,7 +83,7 @@ void PlayerMenu::setMenusForGraphicItems() player->getSideboardZoneGraphicsItem()->setMenu(sideboardMenu); if (auto *commandZone = player->getCommandZoneGraphicsItem()) { - commandZone->setMenu(commandZoneMenu, commandZoneMenu->aViewZone); + commandZone->setMenu(commandZoneMenu); } } }