mrDarker
2025-08-08 421c49432b4fec542d1ac941490dac867281237a
1. 修复添加侧面检以后按钮显示异常问题
已修改2个文件
21 ■■■■■ 文件已修改
EdgeInspector_App/ViewMain_Recipe.cpp 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EdgeInspector_App/ViewMain_Recipe.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EdgeInspector_App/ViewMain_Recipe.cpp
@@ -1138,8 +1138,9 @@
        return;
    }
    if(m_eSelectSide == eSelView)
    if (m_eSelectSide == eSelView) {
        return;
    }
    m_eSelectSide = eSelView;
@@ -2938,6 +2939,8 @@
{
    UINT nID = GetFocus()->GetDlgCtrlID();
    SetSideRadioExclusive(nID);
    UpdateRecipe(TRUE);
    ChangViewCdmSide(nID);
@@ -3256,3 +3259,18 @@
    pApp->ChangeDimension(m_pVisionSetDlg, nDir);
#endif // HALCON_VISION_KEY
}
void CViewMain_Recipe::SetSideRadioExclusive(UINT nSelId)
{
    static const UINT kIds[] = {
        IDC_RDO_SIDE_A_TOP, IDC_RDO_SIDE_B_TOP, IDC_RDO_SIDE_C_TOP, IDC_RDO_SIDE_D_TOP,
        IDC_RDO_SIDE_A_BOT, IDC_RDO_SIDE_B_BOT, IDC_RDO_SIDE_C_BOT, IDC_RDO_SIDE_D_BOT,
        IDC_RDO_SIDE_A_RIP, IDC_RDO_SIDE_B_RIP, IDC_RDO_SIDE_C_RIP, IDC_RDO_SIDE_D_RIP
    };
    for (UINT id : kIds) {
        if (CButton* p = (CButton*)GetDlgItem(id)) {
            p->SetCheck(id == nSelId ? 1 : 0);
        }
    }
}
EdgeInspector_App/ViewMain_Recipe.h
@@ -81,6 +81,7 @@
    BOOL            WriteLinkFile(CString strFilePath);
    void            ChangeRecipe();
    BOOL            ReadRecipe(CString strRecipe);    
    void            SetSideRadioExclusive(UINT nSelId);
public:
    void            UpdateRecipe(BOOL bGetData, int type = 0);