mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-18 17:33:51 +08:00
Core - allow toggles change while onroad
This commit is contained in:
@@ -237,13 +237,13 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) {
|
||||
QObject::connect(uiState()->prime_state, &PrimeState::changed, [this] (PrimeState::Type type) {
|
||||
pair_device->setVisible(type == PrimeState::PRIME_TYPE_UNPAIRED);
|
||||
});
|
||||
QObject::connect(uiState(), &UIState::offroadTransition, [=](bool offroad) {
|
||||
for (auto btn : findChildren<ButtonControl *>()) {
|
||||
if (btn != pair_device) {
|
||||
btn->setEnabled(offroad);
|
||||
}
|
||||
}
|
||||
});
|
||||
// QObject::connect(uiState(), &UIState::offroadTransition, [=](bool offroad) {
|
||||
// for (auto btn : findChildren<ButtonControl *>()) {
|
||||
// if (btn != pair_device) {
|
||||
// btn->setEnabled(offroad);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// power buttons
|
||||
QHBoxLayout *power_layout = new QHBoxLayout();
|
||||
|
||||
Reference in New Issue
Block a user