mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Make some waypoint types undraggable.
None of these (takeoff, landing, divert, bullseye, precise target locations) can be usefully moved, so prevent it.
This commit is contained in:
@@ -379,7 +379,9 @@ class WaypointJs(QObject):
|
||||
altitudeReferenceChanged = Signal()
|
||||
nameChanged = Signal()
|
||||
timingChanged = Signal()
|
||||
isTargetPointChanged = Signal()
|
||||
isTakeoffChanged = Signal()
|
||||
isLandingChanged = Signal()
|
||||
isDivertChanged = Signal()
|
||||
isBullseyeChanged = Signal()
|
||||
|
||||
@@ -438,10 +440,18 @@ class WaypointJs(QObject):
|
||||
return ""
|
||||
return f"{prefix} T+{timedelta(seconds=int(time.total_seconds()))}"
|
||||
|
||||
@Property(bool, notify=isTargetPointChanged)
|
||||
def isTargetPoint(self) -> bool:
|
||||
return self.waypoint.waypoint_type is FlightWaypointType.TARGET_POINT
|
||||
|
||||
@Property(bool, notify=isTakeoffChanged)
|
||||
def isTakeoff(self) -> bool:
|
||||
return self.waypoint.waypoint_type is FlightWaypointType.TAKEOFF
|
||||
|
||||
@Property(bool, notify=isLandingChanged)
|
||||
def isLanding(self) -> bool:
|
||||
return self.waypoint.waypoint_type is FlightWaypointType.LANDING_POINT
|
||||
|
||||
@Property(bool, notify=isDivertChanged)
|
||||
def isDivert(self) -> bool:
|
||||
return self.waypoint.waypoint_type is FlightWaypointType.DIVERT
|
||||
|
||||
Reference in New Issue
Block a user