Commit 69293007 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Don't reset model when adding an active connection

Summary: same resoning as in D24903

Reviewers: jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24924
parent c3291119
......@@ -281,7 +281,6 @@ void NetworkModel::addActiveConnection(const NetworkManager::ActiveConnection::P
addConnection(connection);
}
beginResetModel();
for (NetworkModelItem *item : m_list.returnItems(NetworkItemsList::NetworkItemsList::Uuid, connection->uuid())) {
if (((device && device->uni() == item->devicePath()) || item->devicePath().isEmpty()) || item->type() == NetworkManager::ConnectionSettings::Vpn) {
item->setActiveConnectionPath(activeConnection->path());
......@@ -310,8 +309,8 @@ void NetworkModel::addActiveConnection(const NetworkManager::ActiveConnection::P
item->setTxBytes(deviceStatistics->txBytes());
}
}
updateItem(item);
}
endResetModel();
}
void NetworkModel::addAvailableConnection(const QString &connection, const NetworkManager::Device::Ptr &device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment