LAPTOP-SNT8I5JK\Boounion
2025-09-17 4ef35bf238fc6f7217e4b6de4aee37192ec503ec
SourceCode/Bond/Servo/CControlJobManagerDlg.cpp
@@ -357,6 +357,7 @@
void CControlJobManagerDlg::UpProcessJobId(SERVO::CProcessJob* pJob)
{
   // 更新listbox
   int count = m_listBox.GetCount();
   for (int idx = 0; idx < count; idx++) {
      if ((m_listBox.GetItemDataPtr(idx) == (void*)pJob)) {
@@ -371,4 +372,22 @@
         }
      }
   }
   // 更新树控件
   // 遍历根节点
   HTREEITEM hRoot = m_tree.GetRootItem();
   while (hRoot) {
      // 遍历第二层子节点
      HTREEITEM hChild = m_tree.GetChildItem(hRoot);
      while (hChild) {
         DWORD_PTR data = m_tree.GetItemData(hChild);
         if ((void*)data == pJob) {
            m_tree.SetItemText(hChild, pJob->id().c_str());
            return; // 找到就返回
         }
         hChild = m_tree.GetNextSiblingItem(hChild);
      }
      hRoot = m_tree.GetNextSiblingItem(hRoot);
   }
}