@@ -19,7 +19,6 @@ class XG_JumpDialog : public XG_Dialog
19
19
{
20
20
if (!xg_bSolved) {
21
21
m_nType = 0 ;
22
- m_nNumber = 1 ;
23
22
}
24
23
25
24
if (m_nType == 0 ) {
@@ -29,20 +28,18 @@ class XG_JumpDialog : public XG_Dialog
29
28
EnableWindow (GetDlgItem (hwnd, rad3), FALSE );
30
29
EnableWindow (GetDlgItem (hwnd, rad4), FALSE );
31
30
CheckRadioButton (hwnd, rad1, rad2, rad1);
31
+ SetDlgItemInt (hwnd, edt1, m_jCol, FALSE );
32
+ SetDlgItemInt (hwnd, edt2, m_iRow, FALSE );
32
33
} else {
33
34
EnableWindow (GetDlgItem (hwnd, edt1), FALSE );
34
35
EnableWindow (GetDlgItem (hwnd, edt2), FALSE );
35
36
EnableWindow (GetDlgItem (hwnd, edt3), TRUE );
36
37
EnableWindow (GetDlgItem (hwnd, rad3), TRUE );
37
38
EnableWindow (GetDlgItem (hwnd, rad4), TRUE );
38
39
CheckRadioButton (hwnd, rad1, rad2, rad2);
40
+ SetDlgItemInt (hwnd, edt3, m_nNumber, FALSE );
41
+ CheckRadioButton (hwnd, rad3, rad4, (m_bVert ? rad4 : rad3));
39
42
}
40
-
41
- CheckRadioButton (hwnd, rad3, rad4, (m_bVert ? rad4 : rad3));
42
-
43
- SetDlgItemInt (hwnd, edt1, m_jCol, FALSE );
44
- SetDlgItemInt (hwnd, edt2, m_iRow, FALSE );
45
- SetDlgItemInt (hwnd, edt3, m_nNumber, FALSE );
46
43
}
47
44
48
45
BOOL OnOK (HWND hwnd)
@@ -54,20 +51,23 @@ class XG_JumpDialog : public XG_Dialog
54
51
m_nNumber = GetDlgItemInt (hwnd, edt3, NULL , FALSE );
55
52
56
53
INT nFixed = 0 ;
57
- if (m_jCol <= 0 ) {
58
- m_jCol = 1 ;
59
- nFixed = edt1;
60
- } else if (m_jCol > xg_nCols) {
61
- m_jCol = xg_nCols;
62
- nFixed = edt1;
63
- }
64
54
65
- if (m_iRow <= 0 ) {
66
- m_iRow = 1 ;
67
- nFixed = edt2;
68
- } else if (m_iRow > xg_nRows) {
69
- m_iRow = xg_nRows;
70
- nFixed = edt2;
55
+ if (m_nType == 0 ) {
56
+ if (m_jCol <= 0 ) {
57
+ m_jCol = 1 ;
58
+ nFixed = edt1;
59
+ } else if (m_jCol > xg_nCols) {
60
+ m_jCol = xg_nCols;
61
+ nFixed = edt1;
62
+ }
63
+
64
+ if (m_iRow <= 0 ) {
65
+ m_iRow = 1 ;
66
+ nFixed = edt2;
67
+ } else if (m_iRow > xg_nRows) {
68
+ m_iRow = xg_nRows;
69
+ nFixed = edt2;
70
+ }
71
71
}
72
72
73
73
if (m_nType == 1 ) {
@@ -109,8 +109,6 @@ class XG_JumpDialog : public XG_Dialog
109
109
nFixed = edt3;
110
110
}
111
111
}
112
- } else {
113
- m_nNumber = 1 ;
114
112
}
115
113
116
114
if (nFixed) {
0 commit comments