mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-07 06:33:00 -04:00
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:
parent
42d13e6713
commit
fbd077e91d
2 changed files with 16 additions and 0 deletions
|
@ -498,6 +498,19 @@ ReceiverView::~ReceiverView() {
|
||||||
receiver_model.disable();
|
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() {
|
void ReceiverView::focus() {
|
||||||
button_done.focus();
|
button_done.focus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,6 +362,9 @@ public:
|
||||||
ReceiverView(NavigationView& nav, ReceiverModel& receiver_model);
|
ReceiverView(NavigationView& nav, ReceiverModel& receiver_model);
|
||||||
~ReceiverView();
|
~ReceiverView();
|
||||||
|
|
||||||
|
void on_show() override;
|
||||||
|
void on_hide() override;
|
||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue