Commit 6ddf1128 authored by dogmaphobic's avatar dogmaphobic

Don't delete link configuration if there is still an active link using it.

parent ccc5f622
......@@ -506,6 +506,8 @@ void LinkManager::_updateConfigurationList(void)
// We only care about dynamic links
if(pLink->isDynamic()) {
if(pLink->type() == LinkConfiguration::TypeSerial) {
// Don't mess with connected link. Let it deal with the disapearing device.
if(pLink->getLink() == NULL) {
SerialConfiguration* pSerial = dynamic_cast<SerialConfiguration*>(pLink);
if(!currentPorts.contains(pSerial->portName())) {
_confToDelete.append(pSerial);
......@@ -513,6 +515,7 @@ void LinkManager::_updateConfigurationList(void)
}
}
}
}
// Now remove all links that are gone
foreach (LinkConfiguration* pDelete, _confToDelete) {
removeLinkConfiguration(pDelete);
......
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