Fix: Load the interface list even if PCAP is not selected

Fix: Show "VDE" when hovering over the status icon for a VDE connected NIC
This commit is contained in:
Jordi Guillaumes i Pons
2023-05-06 23:23:00 +02:00
parent c0ba851a5a
commit df6897640d
2 changed files with 6 additions and 2 deletions

View File

@@ -857,6 +857,9 @@ MediaMenu::nicUpdateMenu(int i)
case NET_TYPE_PCAP:
netType = "PCAP";
break;
case NET_TYPE_VDE:
netType = "VDE";
break;
}
QString devName = DeviceConfig::DeviceName(network_card_getdevice(net_cards_conf[i].device_num), network_card_get_internal_name(net_cards_conf[i].device_num), 1);

View File

@@ -148,7 +148,7 @@ SettingsNetwork::onCurrentMachineChanged(int machineId)
selectedRow = 0;
if (net_cards_conf[i].net_type == NET_TYPE_PCAP) {
if (network_ndev > 0) {
QString currentPcapDevice = net_cards_conf[i].host_dev_name;
cbox = findChild<QComboBox *>(QString("comboBoxIntf%1").arg(i + 1));
model = cbox->model();
@@ -161,7 +161,8 @@ SettingsNetwork::onCurrentMachineChanged(int machineId)
}
model->removeRows(0, removeRows);
cbox->setCurrentIndex(selectedRow);
} else if (net_cards_conf[i].net_type == NET_TYPE_VDE) {
}
if (net_cards_conf[i].net_type == NET_TYPE_VDE) {
QString currentVdeSocket = net_cards_conf[i].host_dev_name;
auto editline = findChild<QLineEdit *>(QString("socketVDENIC%1").arg(i+1));
editline->setText(currentVdeSocket);