Sidebar retains its previous display when going onroad

Added function to retain the previous sidebar display when going onroad.
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent fa98b0505f
commit 94820b3e6a
2 changed files with 3 additions and 1 deletions

View File

@@ -314,6 +314,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"ShowMemoryUsage", PERSISTENT}, {"ShowMemoryUsage", PERSISTENT},
{"ShowStorageLeft", PERSISTENT}, {"ShowStorageLeft", PERSISTENT},
{"ShowStorageUsed", PERSISTENT}, {"ShowStorageUsed", PERSISTENT},
{"Sidebar", PERSISTENT},
{"SilentMode", PERSISTENT}, {"SilentMode", PERSISTENT},
{"StandardFollow", PERSISTENT}, {"StandardFollow", PERSISTENT},
{"StandardJerk", PERSISTENT}, {"StandardJerk", PERSISTENT},

View File

@@ -74,10 +74,11 @@ void MainWindow::closeSettings() {
main_layout->setCurrentWidget(homeWindow); main_layout->setCurrentWidget(homeWindow);
if (uiState()->scene.started) { if (uiState()->scene.started) {
homeWindow->showSidebar(false);
// Map is always shown when using navigate on openpilot // Map is always shown when using navigate on openpilot
if (uiState()->scene.navigate_on_openpilot) { if (uiState()->scene.navigate_on_openpilot) {
homeWindow->showMapPanel(true); homeWindow->showMapPanel(true);
} else {
homeWindow->showSidebar(params.getBool("Sidebar"));
} }
} }
} }