From 164199614c4614144d4b4abc455adc6393d9167a Mon Sep 17 00:00:00 2001 From: ConstantijnCrijnen <43953114+ConstantijnCrijnen@users.noreply.github.com> Date: Sat, 30 Jan 2021 07:07:35 +0100 Subject: [PATCH] Language selection auto-save option (#20915) --- Marlin/Configuration_adv.h | 3 +++ Marlin/src/lcd/menu/menu_language.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index bcd1d62422..d21c5069d6 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1534,6 +1534,9 @@ //#define LCD_LANGUAGE_3 de //#define LCD_LANGUAGE_4 es //#define LCD_LANGUAGE_5 it + #ifdef LCD_LANGUAGE_2 + //#define LCD_LANGUAGE_AUTO_SAVE // Automatically save language to EEPROM on change + #endif #endif // diff --git a/Marlin/src/lcd/menu/menu_language.cpp b/Marlin/src/lcd/menu/menu_language.cpp index 26660f22f8..4c4b7880f2 100644 --- a/Marlin/src/lcd/menu/menu_language.cpp +++ b/Marlin/src/lcd/menu/menu_language.cpp @@ -34,7 +34,7 @@ static void set_lcd_language(const uint8_t inlang) { ui.set_language(inlang); - (void)settings.save(); + TERN_(LCD_LANGUAGE_AUTO_SAVE, (void)settings.save()); } void menu_language() {