- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r675 r638 1748 1748 self._cruiseLevel.set_tooltip_text(xstr("route_level_tooltip")) 1749 1749 self._cruiseLevel.set_numeric(True) 1750 self._cruiseLevel.connect("changed", self._cruiseLevelChanged)1751 1750 self._cruiseLevel.connect("value-changed", self._cruiseLevelChanged) 1752 1751 label.set_mnemonic_widget(self._cruiseLevel) … … 1823 1822 def _updateForwardButton(self): 1824 1823 """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): 1830 1828 """Called when the cruise level has changed.""" 1831 1829 self._updateForwardButton()
Note:
See TracChangeset
for help on using the changeset viewer.