fix: MoveScanner SelectedIndex 범위 가드 추가
그리드 빈 영역/헤더 더블클릭, Apply 전, Esc 선택해제 등으로 SelectedIndex가 -1이거나 VisionCorrectionList 범위를 벗어난 상태에서 MoveScanner가 호출되면 인덱스 예외가 발생했다. 진입부에서 범위를 검사해 무시하도록 처리.
This commit is contained in:
parent
0f28908f5f
commit
b3cb159491
@ -535,6 +535,9 @@ namespace WeldingCommon.Views
|
|||||||
|
|
||||||
public void MoveScanner()
|
public void MoveScanner()
|
||||||
{
|
{
|
||||||
|
// 선택된 셀이 없거나(-1) 리스트 범위를 벗어난 인덱스면 무시 (그리드 빈영역/헤더 더블클릭, Apply 전, Esc 선택해제 등)
|
||||||
|
if (SelectedIndex < 0 || SelectedIndex >= VisionCorrectionList.Count) return;
|
||||||
|
|
||||||
double scannerPosX = VisionCorrectionList[SelectedIndex].MasterX;
|
double scannerPosX = VisionCorrectionList[SelectedIndex].MasterX;
|
||||||
double scannerPosY = VisionCorrectionList[SelectedIndex].MasterY;
|
double scannerPosY = VisionCorrectionList[SelectedIndex].MasterY;
|
||||||
var res = MessageUtil.ShowYesNoMessageDialog("Scanner", $"Move Scanner to Postion(X : {scannerPosX}, Y: {scannerPosY}) of Selected Cell?");
|
var res = MessageUtil.ShowYesNoMessageDialog("Scanner", $"Move Scanner to Postion(X : {scannerPosX}, Y: {scannerPosY}) of Selected Cell?");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user