mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
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
old-commit-hash: 3a2bcc092c
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user