Skip to content

Commit

Permalink
fix: item hight error when turn off bluetooth
Browse files Browse the repository at this point in the history
关闭蓝牙后还会收到上一个操作的设备扫描的新增信号
解决方案是关闭后不再响应这个信号

Issue: linuxdeepin/developer-center#6033
  • Loading branch information
kegechen committed Dec 25, 2023
1 parent 4e69cb7 commit 0a9a688
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/bluetooth/componments/bluetoothadapteritem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ void BluetoothAdapterItem::initData()

void BluetoothAdapterItem::onDeviceAdded(const Device *device)
{
// 关闭蓝牙设备时,不再响应上一个扫描操作的新增的 device
if (!m_adapterStateBtn->isChecked())
return;

int insertRow = 0;
foreach (const auto item, m_deviceItems) {
if (item->device()->connectState()) {
Expand Down

0 comments on commit 0a9a688

Please sign in to comment.