Ignore:
File:
1 edited

Legend:

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

    r675 r638  
    17481748        self._cruiseLevel.set_tooltip_text(xstr("route_level_tooltip"))
    17491749        self._cruiseLevel.set_numeric(True)
    1750         self._cruiseLevel.connect("changed", self._cruiseLevelChanged)
    17511750        self._cruiseLevel.connect("value-changed", self._cruiseLevelChanged)
    17521751        label.set_mnemonic_widget(self._cruiseLevel)
     
    18231822    def _updateForwardButton(self):
    18241823        """Update the sensitivity of the forward button."""
    1825         cruiseLevelText = self._cruiseLevel.get_text()
    1826         cruiseLevel = int(cruiseLevelText) if cruiseLevelText else 0
    1827         self._button.set_sensitive(cruiseLevel>=50 and self._getRoute()!="")
    1828 
    1829     def _cruiseLevelChanged(self, *arg):
     1824        self._button.set_sensitive(self._cruiseLevel.get_value_as_int()>=50 and \
     1825                                   self._getRoute()!="")
     1826
     1827    def _cruiseLevelChanged(self, spinButton):
    18301828        """Called when the cruise level has changed."""
    18311829        self._updateForwardButton()
Note: See TracChangeset for help on using the changeset viewer.