Changeset 1154:516ca7c94d1d for src/mlx/gui
- Timestamp:
- 04/24/24 18:31:17 (7 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r1152 r1154 1500 1500 self._listStore.clear() 1501 1501 self._gateList.set_sensitive(True) 1502 occupiedGateNumbers = self._wizard._fleet.getOccupiedGateNumbers() 1503 for gate in lhbpGates.gates: 1504 if gate.isAvailable(lhbpGates, occupiedGateNumbers): 1505 self._listStore.append([gate.number]) 1502 for gate in self._wizard.iterAvailableLHBPGates(): 1503 self._listStore.append([gate.number]) 1506 1504 1507 1505 def finalize(self): … … 6023 6021 self._wizard.bookedFlight.arrivalICAO=="LHBP" and \ 6024 6022 not self._wizard.entranceExam: 6025 occupiedGateNumbers = self._wizard._fleet.getOccupiedGateNumbers() 6026 for gate in lhbpGates.gates: 6027 if gate.isAvailable(lhbpGates, occupiedGateNumbers): 6028 self._gatesModel.append([gate.number]) 6023 for gate in self._wizard.iterAvailableLHBPGates(): 6024 self._gatesModel.append([gate.number]) 6029 6025 self._gateLabel.set_sensitive(True) 6030 6026 self._gate.set_sensitive(True) … … 6871 6867 if result.loggedIn: 6872 6868 self._loginResult = result 6869 self._mergeGates() 6873 6870 self.gui.loginSuccessful() 6874 6871 else: … … 6960 6957 self._simBriefingPage.finalizeCEF() 6961 6958 6959 def iterAvailableLHBPGates(self): 6960 """Iterate over the available gates at LHBP for the current flight's plane.""" 6961 for gate in self._fleet.iterAvailableLHBPGates(self._bookedFlight.tailNumber): 6962 yield gate 6963 6962 6964 def _connectSimulator(self, simulatorType): 6963 6965 """Connect to the simulator.""" … … 6986 6988 assert False 6987 6989 6990 def _mergeGates(self): 6991 """Merge the gate information retrieved during login into the 6992 existing gate information for LHBP.""" 6993 lhbpGates.merge(self._loginResult.gates) 6994 6988 6995 #-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.