mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-27 00:51:07 +00:00
节点重新排序时增加节点ID的重复性校验
Signed-off-by: wangxinqiang007 <wangxinqiang2@huawei.com>
This commit is contained in:
parent
6f456d7167
commit
ba4dc850e9
@ -503,7 +503,9 @@ void AccessibleAbilityClientImpl::SortElementInfosIfNecessary(std::vector<Access
|
||||
sortedElementInfos.push_back(*(iter->second));
|
||||
std::vector<int64_t> childNodeIds = iter->second->GetChildIds();
|
||||
for (auto &id : childNodeIds) {
|
||||
elementList.push_back(id);
|
||||
if (std::find(elementList.begin(), elementList.end(), id) == elementList.end()) {
|
||||
elementList.push_back(id);
|
||||
}
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user