Restore receiver mode when View is displayed.

Needs refactor because on_modulation_changed() doesn't change the modulation so much as the "app" or receiver mode.
This commit is contained in:
Jared Boone 2015-12-03 20:54:18 -08:00
parent 42d13e6713
commit fbd077e91d
2 changed files with 16 additions and 0 deletions

View file

@ -498,6 +498,19 @@ ReceiverView::~ReceiverView() {
receiver_model.disable();
}
void ReceiverView::on_show() {
View::on_show();
// TODO: Separate concepts of baseband "modulation" and receiver "mode".
on_modulation_changed(static_cast<ReceiverModel::Mode>(receiver_model.modulation()));
}
void ReceiverView::on_hide() {
on_modulation_changed(static_cast<ReceiverModel::Mode>(-1));
View::on_hide();
}
void ReceiverView::focus() {
button_done.focus();
}