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();
|
||||
if(inf == DeviceStatus::Unkonw)
|
||||
{
|
||||
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
if (inf != DeviceStatus::Rready)
|
||||
|
||||
@@ -86,19 +86,19 @@ MainWindow::MainWindow(QWidget* aParent)
|
||||
}
|
||||
});
|
||||
|
||||
connect(DeviceManager::Default(), &DeviceManager::startAutoLocateResult, [this](bool aIsSucceed)
|
||||
{
|
||||
if(aIsSucceed)
|
||||
{
|
||||
for(int i=0; i<mTabWidget->count(); ++i)
|
||||
{
|
||||
if(i != mTabWidget->currentIndex())
|
||||
{
|
||||
mTabWidget->setTabEnabled(i, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// connect(DeviceManager::Default(), &DeviceManager::startAutoLocateResult, [this](bool aIsSucceed)
|
||||
// {
|
||||
// if(aIsSucceed)
|
||||
// {
|
||||
// for(int i=0; i<mTabWidget->count(); ++i)
|
||||
// {
|
||||
// if(i != mTabWidget->currentIndex())
|
||||
// {
|
||||
// mTabWidget->setTabEnabled(i, false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::StopScanProcess, this, [this]()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user