Fix unable to go back from main menu to status screen.
This commit is contained in:
parent
e551ed1f6e
commit
020269a83c
@ -24,8 +24,9 @@ public:
|
||||
MenuStack():m_stack(),m_index(0) {}
|
||||
void push(menuFunc_t menu, uint8_t position);
|
||||
Record pop();
|
||||
void reset(){m_index = 0;}
|
||||
private:
|
||||
static const int max_depth = 3;
|
||||
static const int max_depth = 4;
|
||||
Record m_stack[max_depth];
|
||||
uint8_t m_index;
|
||||
};
|
||||
|
@ -106,7 +106,7 @@ union Data
|
||||
byte b[2];
|
||||
int value;
|
||||
};
|
||||
|
||||
static MenuStack menuStack;
|
||||
int8_t ReInitLCD = 0;
|
||||
|
||||
int8_t SDscrool = 0;
|
||||
@ -527,8 +527,8 @@ static void lcd_status_screen()
|
||||
|
||||
if (current_click && (lcd_commands_type != LCD_COMMAND_STOP_PRINT)) //click is aborted unless stop print finishes
|
||||
{
|
||||
|
||||
lcd_goto_menu(lcd_main_menu);
|
||||
menuStack.reset();
|
||||
menu_action_submenu(lcd_main_menu);
|
||||
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
||||
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
||||
currentMenu == lcd_status_screen
|
||||
@ -6663,7 +6663,6 @@ static void lcd_quick_feedback()
|
||||
}
|
||||
|
||||
/** Menu action functions **/
|
||||
static MenuStack menuStack;
|
||||
|
||||
/**
|
||||
* @brief Go up in menu structure
|
||||
|
Loading…
Reference in New Issue
Block a user