From 4276b544bc0a4610b8202ea6a3834eaac91c6548 Mon Sep 17 00:00:00 2001 From: "Christian T. Jacobs" Date: Mon, 24 Apr 2017 17:01:18 +0100 Subject: [PATCH] If the MODE is changed, then set the submode to an empty string. --- pyqso/record_dialog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyqso/record_dialog.py b/pyqso/record_dialog.py index 0fa511d..409076c 100644 --- a/pyqso/record_dialog.py +++ b/pyqso/record_dialog.py @@ -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):