From 95d8711469c55376e7cf7d3d7fbfec99f11fcb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Fri, 4 Aug 2023 10:03:45 +0000 Subject: [PATCH] PFW-1531 Fix #4300 No change in memory --- Firmware/ultralcd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 9408b59d1..0da447426 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3108,7 +3108,11 @@ uint8_t lcd_show_multiscreen_message_with_choices_and_wait_P( exit: KEEPALIVE_STATE(IN_HANDLER); lcd_set_custom_characters(); - lcd_update_enable(true); + // Enable LCD updates again. We may not call lcd_update_enable(true) + // because it may create a recursion scenario when the caller of lcd_show_multiscreen_message_with_choices_and_wait_P + // is a submenu lcd_update_enable(true) will cause another call to the submenu immediately + // and so won't allow the user to exit the submenu + lcd_update_enabled = true; return current_selection; }