onroad UI: fix onroad double tap (#24982)

* The default implementation calls mousePressEvent().

* no sidebar when entering body

* wrong one

* you can't double tap with body anyway (fixes inconsistencies with prime vs not prime)

* hide sidebar
This commit is contained in:
Shane Smiskol
2022-06-28 01:08:11 -07:00
committed by GitHub
parent b3226d505b
commit 3a2bcc092c
+2
View File
@@ -85,6 +85,7 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) {
}
void HomeWindow::mouseDoubleClickEvent(QMouseEvent* e) {
HomeWindow::mousePressEvent(e);
const SubMaster &sm = *(uiState()->sm);
if (sm["carParams"].getCarParams().getNotCar()) {
if (onroad->isVisible()) {
@@ -92,6 +93,7 @@ void HomeWindow::mouseDoubleClickEvent(QMouseEvent* e) {
} else if (body->isVisible()) {
slayout->setCurrentWidget(onroad);
}
showSidebar(false);
}
}