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;
const bool onlyReachable = (m_displayFilter & StatusFilterFlag::Reachable);
if (onlyReachable)
m_dbusInterface->releaseDiscoveryMode(*s_keyId);
else
const bool reachableNeeded = (m_displayFilter & StatusFilterFlag::Reachable);
if (reachableNeeded)
m_dbusInterface->acquireDiscoveryMode(*s_keyId);
else
m_dbusInterface->releaseDiscoveryMode(*s_keyId);
refreshDeviceList();
}