FrogPilot features - Sidebar retains its previous display when going onroad
This commit is contained in:
parent
db2c43a913
commit
08de67845d
@ -83,8 +83,14 @@ void HomeWindow::showDriverView(bool show) {
|
||||
if (show) {
|
||||
emit closeSettings();
|
||||
slayout->setCurrentWidget(driver_view);
|
||||
} else {
|
||||
if (started) {
|
||||
slayout->setCurrentWidget(onroad);
|
||||
sidebar->setVisible(params.getBool("Sidebar"));
|
||||
} else {
|
||||
slayout->setCurrentWidget(home);
|
||||
sidebar->setVisible(show == false);
|
||||
}
|
||||
}
|
||||
sidebar->setVisible(show == false);
|
||||
}
|
||||
@ -94,6 +100,7 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) {
|
||||
if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) {
|
||||
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
||||
uiState()->scene.map_open = onroad->isMapVisible();
|
||||
params.putBool("Sidebar", sidebar->isVisible());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,10 +74,11 @@ void MainWindow::closeSettings() {
|
||||
main_layout->setCurrentWidget(homeWindow);
|
||||
|
||||
if (uiState()->scene.started) {
|
||||
homeWindow->showSidebar(false);
|
||||
// Map is always shown when using navigate on openpilot
|
||||
if (uiState()->scene.navigate_on_openpilot) {
|
||||
homeWindow->showMapPanel(true);
|
||||
} else {
|
||||
homeWindow->showSidebar(params.getBool("Sidebar"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user