mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Include control point name in ground object info.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/498
This commit is contained in:
parent
d2df795ba7
commit
ffcae66f59
@ -178,6 +178,7 @@ class ControlPointJs(QObject):
|
|||||||
|
|
||||||
class GroundObjectJs(QObject):
|
class GroundObjectJs(QObject):
|
||||||
nameChanged = Signal()
|
nameChanged = Signal()
|
||||||
|
controlPointNameChanged = Signal()
|
||||||
unitsChanged = Signal()
|
unitsChanged = Signal()
|
||||||
blueChanged = Signal()
|
blueChanged = Signal()
|
||||||
positionChanged = Signal()
|
positionChanged = Signal()
|
||||||
@ -214,6 +215,10 @@ class GroundObjectJs(QObject):
|
|||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return self.tgo.name
|
return self.tgo.name
|
||||||
|
|
||||||
|
@Property(str, notify=controlPointNameChanged)
|
||||||
|
def controlPointName(self) -> str:
|
||||||
|
return self.tgo.control_point.name
|
||||||
|
|
||||||
@Property(str, notify=categoryChanged)
|
@Property(str, notify=categoryChanged)
|
||||||
def category(self) -> str:
|
def category(self) -> str:
|
||||||
return self.tgo.category
|
return self.tgo.category
|
||||||
|
|||||||
@ -56,7 +56,9 @@ class QGroundObjectMenu(QDialog):
|
|||||||
self.buildings = buildings
|
self.buildings = buildings
|
||||||
self.cp = cp
|
self.cp = cp
|
||||||
self.game = game
|
self.game = game
|
||||||
self.setWindowTitle("Location " + self.ground_object.obj_name)
|
self.setWindowTitle(
|
||||||
|
f"Location - {self.ground_object.obj_name} ({self.cp.name})"
|
||||||
|
)
|
||||||
self.setWindowIcon(EVENT_ICONS["capture"])
|
self.setWindowIcon(EVENT_ICONS["capture"])
|
||||||
self.intelBox = QGroupBox("Units :")
|
self.intelBox = QGroupBox("Units :")
|
||||||
self.buildingBox = QGroupBox("Buildings :")
|
self.buildingBox = QGroupBox("Buildings :")
|
||||||
|
|||||||
@ -570,7 +570,7 @@ class TheaterGroundObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
L.marker(this.tgo.position, { icon: this.icon() })
|
L.marker(this.tgo.position, { icon: this.icon() })
|
||||||
.bindTooltip(`${this.tgo.name}<br />${this.tgo.units.join("<br />")}`)
|
.bindTooltip(`${this.tgo.name} (${this.tgo.controlPointName})<br />${this.tgo.units.join("<br />")}`)
|
||||||
.on("click", () => this.tgo.showInfoDialog())
|
.on("click", () => this.tgo.showInfoDialog())
|
||||||
.on("contextmenu", () => this.tgo.showPackageDialog())
|
.on("contextmenu", () => this.tgo.showPackageDialog())
|
||||||
.addTo(this.layer());
|
.addTo(this.layer());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user