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
taco
Shane Smiskol 3 years ago committed by GitHub
parent 2d945b2fd5
commit 0c32c661eb
  1. 2
      selfdrive/ui/qt/home.cc

@ -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);
}
}

Loading…
Cancel
Save