Skip to content

Commit e50a92d

Browse files
committed
When navigating back in the menu, actually set CurrentScreen as well.
1 parent 7be8605 commit e50a92d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lib/3rd_party_adapters/LVGL/Screen.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ static inline void IScreen_leave()
1313
//clear the current screen of lvgl
1414
lv_obj_clean(lv_scr_act());
1515

16-
//draw previous screen
17-
screenHistory.top()->draw();
18-
//remove current screen
16+
//get previous screen
17+
CurrentScreen = screenHistory.top();
18+
//remove the previous screen from list
1919
screenHistory.pop();
20+
21+
//draw the previous screen
22+
CurrentScreen->draw();
2023
}
2124
else
2225
{

0 commit comments

Comments
 (0)