sidebar: dont update states when hidden (#22948)

pull/22949/head
Dean Lee 2021-11-17 21:12:57 +08:00 committed by GitHub
parent 7a3754d50b
commit ddc35826f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

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