From 3a2bcc092c74925edb161959cdcc66073a9cd8f3 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 28 Jun 2022 01:08:11 -0700 Subject: [PATCH] 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 --- selfdrive/ui/qt/home.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index e522d6160d..aec9bffbc0 100644 --- a/selfdrive/ui/qt/home.cc +++ b/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); } }