Check model is off before changing model - Fixes #7715 (#7719)

Check model is off before changing model
This commit is contained in:
DanielGeA
2020-07-31 16:27:31 +02:00
committed by GitHub
parent 06d3110d7c
commit ac9f510005
5 changed files with 37 additions and 0 deletions
+8
View File
@@ -242,6 +242,10 @@ void onDeleteModelConfirm(const char * result)
void onModelSelectMenu(const char * result)
{
if (result == STR_SELECT_MODEL) {
if (!g_eeGeneral.disableRssiPoweroffAlarm) {
if (!confirmModelChange())
return;
}
// we store the latest changes if any
storageFlushCurrentModel();
storageCheck(true);
@@ -259,6 +263,10 @@ void onModelSelectMenu(const char * result)
deleteMode = MODE_DELETE_MODEL;
}
else if (result == STR_CREATE_MODEL) {
if (!g_eeGeneral.disableRssiPoweroffAlarm) {
if (!confirmModelChange())
return;
}
storageCheck(true);
modelslist.addModel(currentCategory, createModel());
selectMode = MODE_SELECT_MODEL;