FrogPilot features - Sidebar retains its previous display when going onroad
This commit is contained in:
parent
db2c43a913
commit
08de67845d
@ -84,7 +84,13 @@ void HomeWindow::showDriverView(bool show) {
|
|||||||
emit closeSettings();
|
emit closeSettings();
|
||||||
slayout->setCurrentWidget(driver_view);
|
slayout->setCurrentWidget(driver_view);
|
||||||
} else {
|
} else {
|
||||||
slayout->setCurrentWidget(home);
|
if (started) {
|
||||||
|
slayout->setCurrentWidget(onroad);
|
||||||
|
sidebar->setVisible(params.getBool("Sidebar"));
|
||||||
|
} else {
|
||||||
|
slayout->setCurrentWidget(home);
|
||||||
|
sidebar->setVisible(show == false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
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())) {
|
if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) {
|
||||||
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
||||||
uiState()->scene.map_open = onroad->isMapVisible();
|
uiState()->scene.map_open = onroad->isMapVisible();
|
||||||
|
params.putBool("Sidebar", sidebar->isVisible());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user