fix:the lan area show error list, when change name of activate connection and disactivate the connection.

This commit is contained in:
renpeijia 2021-09-30 19:32:03 +08:00
parent 9e5a79fcf3
commit 360ee2a96e
1 changed files with 5 additions and 7 deletions

View File

@ -753,15 +753,13 @@ void LanPage::updateConnectionArea(QString uuid)
emit lanActiveConnectionStateChanged(p_newItem->m_ifaceName, uuid, p_newItem->m_connectState);
deleteConnectionMapItem(m_activeMap, m_activatedLanListWidget, uuid);
if (m_activeMap.count() <= 0) {
addEmptyConnectItem(m_activeMap, m_activatedLanListWidget);
}
if (p_newItem->m_ifaceName == m_currentDeviceName || p_newItem->m_ifaceName == "") {
qDebug()<<"[LanPage] update connection area"<<p_newItem->m_connectName;
deleteConnectionMapItem(m_activeMap, m_activatedLanListWidget, uuid);
if (m_activeMap.count() <= 0) {
addEmptyConnectItem(m_activeMap, m_activatedLanListWidget);
}
if (connectionItemIsExist(m_deactiveMap, uuid)) {
delete p_newItem;
p_newItem = nullptr;