From ec71ceead3aefaba4e64fcffc5d4216a548d6e23 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Wed, 17 Nov 2021 21:12:57 +0800 Subject: [PATCH] sidebar: dont update states when hidden (#22948) old-commit-hash: ddc35826f74ead9f6529910880f9d4f2c16fe727 --- selfdrive/ui/qt/sidebar.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selfdrive/ui/qt/sidebar.cc b/selfdrive/ui/qt/sidebar.cc index cd53a5b725..73c4e2f8ce 100644 --- a/selfdrive/ui/qt/sidebar.cc +++ b/selfdrive/ui/qt/sidebar.cc @@ -43,6 +43,8 @@ void Sidebar::mouseReleaseEvent(QMouseEvent *event) { } void Sidebar::updateState(const UIState &s) { + if (!isVisible()) return; + auto &sm = *(s.sm); auto deviceState = sm["deviceState"].getDeviceState();