From d77dd42f8ebd4f903d82ccd58dd6a35aee1bfb72 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 18 Feb 2022 00:04:48 +0600 Subject: [PATCH] qt: Fix network adapter combobox being grayed out when PCap is initially enabled --- src/qt/qt_settingsnetwork.cpp | 10 ++++++++++ src/qt/qt_settingsnetwork.hpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/qt/qt_settingsnetwork.cpp b/src/qt/qt_settingsnetwork.cpp index 290fea43b..98b1ac486 100644 --- a/src/qt/qt_settingsnetwork.cpp +++ b/src/qt/qt_settingsnetwork.cpp @@ -127,3 +127,13 @@ void SettingsNetwork::on_pushButtonConfigure_clicked() { DeviceConfig::ConfigureDevice(network_card_getdevice(ui->comboBoxAdapter->currentData().toInt()), 0, qobject_cast(Settings::settings)); } + +void SettingsNetwork::on_comboBoxPcap_currentIndexChanged(int index) +{ + if (index < 0) { + return; + } + + enableElements(ui); +} + diff --git a/src/qt/qt_settingsnetwork.hpp b/src/qt/qt_settingsnetwork.hpp index f17eb98f1..b473ee3df 100644 --- a/src/qt/qt_settingsnetwork.hpp +++ b/src/qt/qt_settingsnetwork.hpp @@ -25,6 +25,8 @@ private slots: void on_comboBoxAdapter_currentIndexChanged(int index); void on_comboBoxNetwork_currentIndexChanged(int index); + void on_comboBoxPcap_currentIndexChanged(int index); + private: Ui::SettingsNetwork *ui; int machineId = 0;