mrDarker
2025-08-08 421c49432b4fec542d1ac941490dac867281237a
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);
      }
   }
}