Merge branch '2309bug1' into 'yhkylin/v101'
fix bug 180228 【网络连接】删除有线网络,点击未连接网络后一直处于选中状态 See merge request kylinos-src/kylin-nm!208
This commit is contained in:
commit
9b1a6ed684
|
@ -352,9 +352,11 @@ void LanPage::constructActiveConnectionArea()
|
|||
p_activeConnectionItem = nullptr;
|
||||
}
|
||||
setNetSpeed->start(REFRESH_NETWORKSPEED_TIMER);
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
} else {
|
||||
qDebug()<<"[LanPage] there is not active";
|
||||
addEmptyConnectItem(m_activeConnectionMap, m_activatedLanListWidget);
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -835,6 +837,8 @@ QListWidgetItem *LanPage::addNewItem(KyConnectItem *itemData, QListWidget *listW
|
|||
|
||||
void LanPage::updateActivatedConnectionArea(KyConnectItem *p_newItem)
|
||||
{
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
|
||||
if (m_activeConnectionMap.contains(p_newItem->m_connectUuid)) {
|
||||
return;
|
||||
}
|
||||
|
@ -863,6 +867,7 @@ void LanPage::updateConnectionArea(KyConnectItem *p_newItem)
|
|||
deleteConnectionMapItem(m_activeConnectionMap, m_activatedLanListWidget, p_newItem->m_connectUuid);
|
||||
if (m_activeConnectionMap.count() <= 0) {
|
||||
addEmptyConnectItem(m_activeConnectionMap, m_activatedLanListWidget);
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
}
|
||||
|
||||
if (p_newItem->m_ifaceName == m_currentDeviceName || p_newItem->m_ifaceName == "") {
|
||||
|
|
|
@ -481,12 +481,14 @@ void WlanPage::constructActivateConnectionArea()
|
|||
|
||||
height += p_listWidgetItem->sizeHint().height();
|
||||
setNetSpeed->start(REFRESH_NETWORKSPEED_TIMER);
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
}
|
||||
}
|
||||
|
||||
if (height == 0) {
|
||||
QListWidgetItem *p_listWidgetItem = addEmptyItem(m_activatedNetListWidget);
|
||||
m_activateConnectionItemMap.insert(EMPTY_SSID, p_listWidgetItem);
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
|
||||
height += p_listWidgetItem->sizeHint().height();
|
||||
}
|
||||
|
@ -933,6 +935,8 @@ void WlanPage::wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::St
|
|||
|
||||
void WlanPage::updateActivatedArea(QString uuid, QString ssid, QString devName)
|
||||
{
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
|
||||
if (m_activateConnectionItemMap.contains(ssid)) {
|
||||
return;
|
||||
}
|
||||
|
@ -987,6 +991,7 @@ void WlanPage::updateWirelessNetArea(QString uuid, QString ssid, QString devName
|
|||
deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid);
|
||||
QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget);
|
||||
m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem);
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height());
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue