From 5021fadd5d7554862009ac75a3950717eea73035 Mon Sep 17 00:00:00 2001 From: NotaRobotexe Date: Wed, 24 Jul 2019 11:20:27 +0200 Subject: [PATCH] multiple sheets - menu switching bug --- Firmware/ultralcd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 43af300e..0d726769 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -6493,7 +6493,7 @@ static void change_sheet() } static void change_sheet_from_menu(){ - uint8_t next_sheet = selected_sheet+1; + uint8_t next_sheet = eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet))+1; while(true){ if(next_sheet > 2) next_sheet = 0; if(is_sheet_initialized(next_sheet)){ @@ -6745,7 +6745,7 @@ static void lcd_main_menu() if(!isPrintPaused && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal)) { - MENU_ITEM_SUBMENU_SELECT_SHEET_E(EEPROM_Sheets_base->s[selected_sheet], change_sheet_from_menu); + MENU_ITEM_SUBMENU_SELECT_SHEET_E(EEPROM_Sheets_base->s[eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet))], change_sheet_from_menu); } if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))