From e1009bdafad4ab8b69724543082e540f8447ce28 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 24 Dec 2020 16:09:13 +0100 Subject: [PATCH] Fixed ships group that could be replaced by sam site. Removed the possibility to disband ship groups for now. --- qt_ui/windows/groundobject/QGroundObjectMenu.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qt_ui/windows/groundobject/QGroundObjectMenu.py b/qt_ui/windows/groundobject/QGroundObjectMenu.py index d6907950..dfbc5c11 100644 --- a/qt_ui/windows/groundobject/QGroundObjectMenu.py +++ b/qt_ui/windows/groundobject/QGroundObjectMenu.py @@ -21,6 +21,7 @@ from game import Game, db from game.data.building_data import FORTIFICATION_BUILDINGS from game.db import PRICES, PinpointStrike, REWARDS, unit_type_of from game.theater import ControlPoint, TheaterGroundObject +from game.theater.theatergroundobject import NavalGroundObject from gen.defenses.armor_group_generator import \ generate_armor_group_of_type_and_size from gen.sam.sam_group_generator import get_faction_possible_sams_generator @@ -81,9 +82,10 @@ class QGroundObjectMenu(QDialog): self.buy_replace.clicked.connect(self.buy_group) self.buy_replace.setProperty("style", "btn-success") - if self.total_value > 0: - self.actionLayout.addWidget(self.sell_all_button) - self.actionLayout.addWidget(self.buy_replace) + if not isinstance(self.ground_object, NavalGroundObject): + if self.total_value > 0: + self.actionLayout.addWidget(self.sell_all_button) + self.actionLayout.addWidget(self.buy_replace) if self.cp.captured and self.ground_object.dcs_identifier == "AA": self.mainLayout.addLayout(self.actionLayout)