This commit is contained in:
Your Name
2024-04-28 15:04:11 -05:00
parent 0f3bcab147
commit 7c118edb76

View File

@@ -83,11 +83,12 @@ void HomeWindow::updateState(const UIState &s) {
void HomeWindow::offroadTransition(bool offroad) { void HomeWindow::offroadTransition(bool offroad) {
body->setEnabled(false); body->setEnabled(false);
sidebar->setVisible(offroad);
if (offroad) { if (offroad) {
sidebar->setVisible(false);
slayout->setCurrentWidget(ready); slayout->setCurrentWidget(ready);
// slayout->setCurrentWidget(home); // slayout->setCurrentWidget(home);
} else { } else {
sidebar->setVisible(false);
slayout->setCurrentWidget(onroad); slayout->setCurrentWidget(onroad);
uiState()->scene.map_open = onroad->isMapVisible(); uiState()->scene.map_open = onroad->isMapVisible();
} }
@@ -122,6 +123,7 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) {
// CLEARPILOT - click ready shows home // CLEARPILOT - click ready shows home
if (!onroad->isVisible() && ready->isVisible()) { if (!onroad->isVisible() && ready->isVisible()) {
sidebar->setVisible(true);
slayout->setCurrentWidget(home); slayout->setCurrentWidget(home);
} }