Changeset 1119:3d940600be4d
- Timestamp:
- 10/31/23 16:09:41 (14 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r1118 r1119 3019 3019 return self._alternate.get_text() 3020 3020 3021 @alternate.setter 3022 def alternate(self, a): 3023 """Set the ICAO code of the alternate airport.""" 3024 self._alternate.set_text(a) 3025 3021 3026 def activate(self): 3022 3027 """Setup the route from the booked flight.""" … … 3043 3048 alternate = self._alternate.get_text() 3044 3049 if useSimBrief: 3045 self._button.set_sensitive(len(alternate)==4 or self._wizard.entranceExam) 3050 self._button.set_sensitive(len(alternate)==0 or len(alternate)==4 3051 or self._wizard.entranceExam) 3046 3052 else: 3047 3053 cruiseLevelText = self._cruiseLevel.get_text() … … 3727 3733 if filedCruiseAltitude>0: 3728 3734 plan["fl"] = filedCruiseAltitude 3729 plan["altn"] = wizard.alternate 3735 3736 alternate = wizard.alternate 3737 if alternate: 3738 plan["altn"] = wizard.alternate 3730 3739 3731 3740 plan["addedfuel"] = str(self._extraFuel.get_int() / 1000.0) … … 3840 3849 if destinationElement.tag == "plan_rwy": 3841 3850 flightInfo["arr_rwy"] = destinationElement.text 3851 elif element.tag == "alternate": 3852 alternateElementList = list(element) 3853 for alternateElement in alternateElementList: 3854 if alternateElement.tag == "icao_code": 3855 flightInfo["altn_icao"] = alternateElement.text 3842 3856 elif element.tag == "fuel": 3843 3857 fuelElementList = list(element) … … 3939 3953 self._wizard.departureSID = sid 3940 3954 self._wizard.arrivalSTAR = star 3955 3956 self._wizard.alternate = flightInfo["altn_icao"] 3941 3957 3942 3958 takeoffRunway = flightInfo["dep_rwy"] … … 6506 6522 """Get the ICAO code of the alternate airport.""" 6507 6523 return self._routePage.alternate 6524 6525 @alternate.setter 6526 def alternate(self, a): 6527 """Set the ICAO code of the alternate airport.""" 6528 self._routePage.alternate = a 6508 6529 6509 6530 @property
Note:
See TracChangeset
for help on using the changeset viewer.