If the MODE is changed, then set the submode to an empty string.

pull/61/head
Christian T. Jacobs 2017-04-24 17:01:18 +01:00
rodzic 7c263c9fe2
commit 4276b544bc
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -273,9 +273,10 @@ class RecordDialog:
def on_mode_changed(self, combo):
""" If the MODE field has changed its value, then fill the SUBMODE field with all the available SUBMODE options for that new MODE. """
self.sources["SUBMODE"].get_model().clear()
text = combo.get_active_text()
for submode in MODES[text]:
mode = combo.get_active_text()
for submode in MODES[mode]:
self.sources["SUBMODE"].append_text(submode)
self.sources["SUBMODE"].set_active(MODES[mode].index("")) # Set the submode to an empty string.
return
def on_key_release(self, widget, event):