fix: Make scan button enabled when dms disconnected.
This commit is contained in:
@@ -336,6 +336,7 @@ void DeviceManager::startScan(const QString& json, bool empty)
|
|||||||
DeviceStatus inf = getDeviceStatus();
|
DeviceStatus inf = getDeviceStatus();
|
||||||
if(inf == DeviceStatus::Unkonw)
|
if(inf == DeviceStatus::Unkonw)
|
||||||
{
|
{
|
||||||
|
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (inf != DeviceStatus::Rready)
|
if (inf != DeviceStatus::Rready)
|
||||||
|
|||||||
@@ -86,19 +86,19 @@ MainWindow::MainWindow(QWidget* aParent)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(DeviceManager::Default(), &DeviceManager::startAutoLocateResult, [this](bool aIsSucceed)
|
// connect(DeviceManager::Default(), &DeviceManager::startAutoLocateResult, [this](bool aIsSucceed)
|
||||||
{
|
// {
|
||||||
if(aIsSucceed)
|
// if(aIsSucceed)
|
||||||
{
|
// {
|
||||||
for(int i=0; i<mTabWidget->count(); ++i)
|
// for(int i=0; i<mTabWidget->count(); ++i)
|
||||||
{
|
// {
|
||||||
if(i != mTabWidget->currentIndex())
|
// if(i != mTabWidget->currentIndex())
|
||||||
{
|
// {
|
||||||
mTabWidget->setTabEnabled(i, false);
|
// mTabWidget->setTabEnabled(i, false);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
connect(EventCenter::Default(), &EventCenter::StopScanProcess, this, [this]()
|
connect(EventCenter::Default(), &EventCenter::StopScanProcess, this, [this]()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user