From 5f4dd47ab52c18783ed6bbdcf4defe32ce28cf1d Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 12 Jan 2025 09:45:36 -0500 Subject: [PATCH] Revert "unlikely but why not" This reverts commit 72f45a7516174e230e6a52268e0684a0fed4b76f. --- selfdrive/ui/qt/offroad/settings.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index da9de24f81..b633bdf33a 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -203,6 +203,10 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) { }); addItem(pair_device); + QObject::connect(uiState()->prime_state, &PrimeState::changed, [this] (PrimeState::Type type) { + pair_device->setVisible(type == PrimeState::PRIME_TYPE_UNPAIRED); + }); + #ifndef SUNNYPILOT // offroad-only buttons @@ -257,13 +261,7 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) { } }); addItem(translateBtn); -#endif - QObject::connect(uiState()->prime_state, &PrimeState::changed, [this] (PrimeState::Type type) { - pair_device->setVisible(type == PrimeState::PRIME_TYPE_UNPAIRED); - }); - -#ifndef SUNNYPILOT QObject::connect(uiState(), &UIState::offroadTransition, [=](bool offroad) { for (auto btn : findChildren()) { if (btn != pair_device) {