We want the discovery mode active when the reachable devices are needed

This commit is contained in:
Aleix Pol 2016-06-05 22:49:32 +02:00
parent d6eb2d07bc
commit 8b523ad59a

View file

@ -159,11 +159,11 @@ void DevicesModel::setDisplayFilter(int flags)
{ {
m_displayFilter = (StatusFilterFlag)flags; m_displayFilter = (StatusFilterFlag)flags;
const bool onlyReachable = (m_displayFilter & StatusFilterFlag::Reachable); const bool reachableNeeded = (m_displayFilter & StatusFilterFlag::Reachable);
if (onlyReachable) if (reachableNeeded)
m_dbusInterface->releaseDiscoveryMode(*s_keyId);
else
m_dbusInterface->acquireDiscoveryMode(*s_keyId); m_dbusInterface->acquireDiscoveryMode(*s_keyId);
else
m_dbusInterface->releaseDiscoveryMode(*s_keyId);
refreshDeviceList(); refreshDeviceList();
} }