From 9dab7369f710f4ca0c69637c2885a23e948410cb Mon Sep 17 00:00:00 2001 From: 3djc Date: Fri, 9 Feb 2024 00:17:53 +0100 Subject: [PATCH] fix: load RGBLUA/LUA SF after selection (#4621) --- radio/src/gui/128x64/model_special_functions.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/128x64/model_special_functions.cpp b/radio/src/gui/128x64/model_special_functions.cpp index 5eb357df0..07b847f2c 100644 --- a/radio/src/gui/128x64/model_special_functions.cpp +++ b/radio/src/gui/128x64/model_special_functions.cpp @@ -76,6 +76,9 @@ void onCustomFunctionsFileSelectionMenu(const char * result) // The user choosed a file in the list memcpy(cfn->play.name, result, sizeof(cfn->play.name)); storageDirty(eeFlags); + if (CFN_ACTIVE(cfn) && (func == FUNC_PLAY_SCRIPT || func == FUNC_RGB_LED)) { + LUA_LOAD_MODEL_SCRIPTS(); + } } } #endif // SDCARD @@ -473,7 +476,12 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF case 5: drawCheckBox(MODEL_SPECIAL_FUNC_5TH_COLUMN_ONOFF, y, CFN_ACTIVE(cfn), attr); - if (active) CFN_ACTIVE(cfn) = checkIncDec(event, CFN_ACTIVE(cfn), 0, 1, eeFlags); + if (active) { + CFN_ACTIVE(cfn) = checkIncDec(event, CFN_ACTIVE(cfn), 0, 1, eeFlags); + if (checkIncDec_Ret && (func == FUNC_PLAY_SCRIPT || func == FUNC_RGB_LED)) { + LUA_LOAD_MODEL_SCRIPTS(); + } + } break; } }