Changeset 1142:d9373f5599db


Ignore:
Timestamp:
04/21/24 14:03:59 (3 weeks ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

The new adult passenger weight query functions are used (re #386).

Location:
src/mlx/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r1139 r1142  
    26782678        zfw += (self._numCabinCrew.get_int() - bookedFlight.dowNumCabinCrew) *  \
    26792679            const.WEIGHT_CABIN_CREW
    2680         zfw += self._numPassengers.get_int() * \
    2681             (const.WEIGHT_PASSENGER_CHARTER
    2682              if bookedFlight.flightType==const.FLIGHTTYPE_CHARTER
    2683              else const.WEIGHT_PASSENGER)
     2680        zfw += self._numPassengers.get_int() * bookedFlight.passengerWeight
    26842681        zfw += self._numChildren.get_int() * const.WEIGHT_CHILD
    26852682        zfw += self._numInfants.get_int() * const.WEIGHT_INFANT
  • src/mlx/gui/weighthelp.py

    r1034 r1142  
    438438        if self._flightType>=0 and self._pax>=0 and self._children>=0 and \
    439439           self._infants>=0:
    440             return self._pax * \
    441                 (const.WEIGHT_PASSENGER_CHARTER
    442                  if self._flightType==const.FLIGHTTYPE_CHARTER
    443                  else const.WEIGHT_PASSENGER) + \
     440            return self._pax * const.getPassengerWeight(self._flightType) + \
    444441                self._children * const.WEIGHT_CHILD + \
    445442                self._infants * const.WEIGHT_INFANT
Note: See TracChangeset for help on using the changeset viewer.