Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Apr 2, 2024
1 parent d18b59e commit 0ad74ec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 99 deletions.
26 changes: 15 additions & 11 deletions GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2724,7 +2724,11 @@ BOOL __fastcall XgNumberingSave(HWND hwnd, BOOL bPattern)

// 保存する。
xg_strFileName = szPath;
return XgOnSave(hwnd);
if (!XgOnSave(hwnd))
return FALSE;

XG_FILE_MODIFIED(FALSE);
return TRUE;
}

// ズームを実際のウィンドウに合わせる。
Expand Down Expand Up @@ -2863,16 +2867,16 @@ TRIVALUE XgGenerateFromPat(HWND hwnd)
xg_solution.DoNumberingNoCheck();
XgUpdateHints();

// 自動保存なら自動保存する。
if (xg_bAutoSave) {
XgNumberingSave(hwnd, FALSE);
}

// 元に戻す情報を設定。
auto sa3 = std::make_shared<XG_UndoData_SetAll>();
sa3->Get();
xg_ubUndoBuffer.Commit(UC_SETALL, sa2, sa3);

// 自動保存なら自動保存する。
if (xg_bAutoSave) {
XgNumberingSave(hwnd, FALSE);
}

// 結果を表示する。
XgShowResults(hwnd, TRUE);
}
Expand Down Expand Up @@ -5509,6 +5513,11 @@ void __fastcall XgGenerate(HWND hwnd)
// 答えを表示するかどうか。
xg_bShowAnswer = xg_bShowAnswerOnGenerate;

// イメージを更新する。
XgSetCaretPos();
XgMarkUpdate();
XgUpdateImage(hwnd);

// 「元に戻す」情報を確定する。
auto sa2 = std::make_shared<XG_UndoData_SetAll>();
sa2->Get();
Expand All @@ -5519,11 +5528,6 @@ void __fastcall XgGenerate(HWND hwnd)
XgNumberingSave(hwnd, FALSE);
}

// イメージを更新する。
XgSetCaretPos();
XgMarkUpdate();
XgUpdateImage(hwnd);

// 結果を表示する。
XgShowResults(hwnd, TRUE);
}
Expand Down
44 changes: 0 additions & 44 deletions lang/en_US.rc
Original file line number Diff line number Diff line change
Expand Up @@ -639,34 +639,6 @@ FONT 9, "Tahoma"
PUSHBUTTON "Cancel", psh1, 85, 70, 75, 14
}

IDD_SEQCREATE DIALOG 0, 0, 310, 155
CAPTION "Continuously generate crosswords"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 9, "Tahoma"
{
LTEXT "# of &columns:", -1, 10, 10, 50, 12
EDITTEXT edt2, 65, 7, 30, 14, ES_NUMBER | ES_RIGHT
CONTROL "", scr1, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 101, 24, 12, 20
LTEXT "cells", -1, 109, 10, 20, 12
LTEXT "# of &rows:", -1, 150, 10, 49, 12
EDITTEXT edt1, 205, 7, 31, 14, ES_NUMBER | ES_RIGHT
CONTROL "", scr2, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 101, 24, 12, 20
LTEXT "cells", -1, 248, 10, 20, 12
AUTOCHECKBOX "&SmartResolution", chx2, 10, 60, 75, 14
AUTOCHECKBOX "Re&try regularly", chx1, 95, 60, 110, 14
LTEXT "Max. Word &Length:", stc1, 10, 87, 67, 12
EDITTEXT edt3, 80, 85, 30, 14, ES_NUMBER | ES_RIGHT
CONTROL "", scr3, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 103, 90, 12, 20
LTEXT "# of generations:", -1, 130, 87, 79, 12
CONTROL "100", edt4, "EDIT", ES_NUMBER | ES_RIGHT | WS_BORDER | WS_TABSTOP, 215, 85, 30, 14
CONTROL "", scr4, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 259, 87, 12, 20
LTEXT "&Save to:", -1, 10, 115, 60, 12
CONTROL "", cmb2, "ComboBoxEx32", CBS_AUTOHSCROLL | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP, 78, 113, 165, 80
PUSHBUTTON "Br&owse...", psh2, 250, 113, 50, 14
DEFPUSHBUTTON "&Generate", IDOK, 175, 135, 60, 14
PUSHBUTTON "Cancel", IDCANCEL, 240, 135, 60, 14
}

IDD_CONFIG DIALOG 0, 0, 274, 250
CAPTION "Appearance (Alt+Enter)"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
Expand Down Expand Up @@ -724,22 +696,6 @@ FONT 9, "Tahoma"
PUSHBUTTON "Import/E&xport...", psh12, 5, 230, 100, 15
}

IDD_SEQSOLVE DIALOG 0, 0, 310, 80
CAPTION "Continuously find solutions"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 9, "Tahoma"
{
LTEXT "&Save to:", -1, 10, 7, 60, 12
CONTROL "", cmb1, "ComboBoxEx32", CBS_AUTOHSCROLL | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP, 75, 5, 165, 100
LTEXT "# of &generations:", -1, 10, 27, 77, 12
CONTROL "100", edt1, "EDIT", ES_NUMBER | ES_RIGHT | WS_BORDER | WS_TABSTOP, 90, 25, 65, 14
CONTROL "", scr1, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 101, 24, 12, 20
PUSHBUTTON "Br&owse...", psh1, 250, 5, 50, 14
AUTOCHECKBOX "Re&try regularly", chx1, 10, 45, 155, 14
DEFPUSHBUTTON "&Solve", IDOK, 175, 60, 60, 14
PUSHBUTTON "Cancel", IDCANCEL, 240, 60, 60, 14
}

IDD_NOTES DIALOG 0, 0, 185, 185
CAPTION "Header and remarks (Ctrl+Enter)"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
Expand Down
44 changes: 0 additions & 44 deletions lang/ja_JP.rc
Original file line number Diff line number Diff line change
Expand Up @@ -642,34 +642,6 @@ FONT 9, "MS UI Gothic"
PUSHBUTTON "キャンセル", psh1, 85, 70, 75, 14
}

IDD_SEQCREATE DIALOG 0, 0, 310, 155
CAPTION "問題の連続作成"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 9, "MS UI Gothic"
{
LTEXT "ヨコのサイズ(&C):", -1, 10, 10, 50, 12
EDITTEXT edt2, 65, 7, 30, 14, ES_NUMBER | ES_RIGHT
CONTROL "", scr1, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 101, 24, 12, 20
LTEXT "マス", -1, 109, 10, 20, 12
LTEXT "タテのサイズ(&R):", -1, 150, 10, 49, 12
EDITTEXT edt1, 205, 7, 31, 14, ES_NUMBER | ES_RIGHT
CONTROL "", scr2, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 101, 24, 12, 20
LTEXT "マス", -1, 248, 10, 20, 12
AUTOCHECKBOX "スマート解決(&S)", chx2, 10, 60, 75, 14
AUTOCHECKBOX "一定時間が過ぎたら再試行(&T)", chx1, 95, 60, 110, 14
LTEXT "最大単語長(&L):", stc1, 10, 87, 60, 12
EDITTEXT edt3, 80, 85, 30, 14, ES_NUMBER | ES_RIGHT
CONTROL "", scr3, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 103, 90, 12, 20
LTEXT "作成する問題の個数(&N):", -1, 130, 87, 79, 12
CONTROL "100", edt4, "EDIT", ES_NUMBER | ES_RIGHT | WS_BORDER | WS_TABSTOP, 215, 85, 30, 14
CONTROL "", scr4, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 259, 87, 12, 20
LTEXT "保存先フォルダ(&S):", -1, 10, 115, 60, 12
CONTROL "", cmb2, "ComboBoxEx32", CBS_AUTOHSCROLL | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP, 78, 113, 165, 80
PUSHBUTTON "参照(&O)...", psh2, 250, 113, 50, 14
DEFPUSHBUTTON "計算開始(&G)", IDOK, 175, 135, 60, 14
PUSHBUTTON "キャンセル", IDCANCEL, 240, 135, 60, 14
}

IDD_CONFIG DIALOG 0, 0, 274, 250
CAPTION "見た目の設定 (Alt+Enter)"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
Expand Down Expand Up @@ -727,22 +699,6 @@ FONT 9, "MS UI Gothic"
PUSHBUTTON "インポート/エクスポート(&X)...", psh12, 5, 230, 100, 15
}

IDD_SEQSOLVE DIALOG 0, 0, 310, 80
CAPTION "解の連続作成"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 9, "MS UI Gothic"
{
LTEXT "保存先フォルダ(&S):", -1, 10, 7, 60, 12
CONTROL "", cmb1, "ComboBoxEx32", CBS_AUTOHSCROLL | CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP, 75, 5, 165, 100
LTEXT "作成する問題の個数(&N):", -1, 10, 27, 77, 12
CONTROL "100", edt1, "EDIT", ES_NUMBER | ES_RIGHT | WS_BORDER | WS_TABSTOP, 90, 25, 65, 14
CONTROL "", scr1, "msctls_updown32", UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_SETBUDDYINT, 101, 24, 12, 20
PUSHBUTTON "参照(&O)...", psh1, 250, 5, 50, 14
AUTOCHECKBOX "一定時間が過ぎたら再試行(&T)", chx1, 10, 45, 155, 14
DEFPUSHBUTTON "計算開始(&S)", IDOK, 175, 60, 60, 14
PUSHBUTTON "キャンセル", IDCANCEL, 240, 60, 60, 14
}

IDD_NOTES DIALOG 0, 0, 185, 185
CAPTION "ヘッダーと備考欄 (Ctrl+Enter)"
STYLE DS_CENTER | DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
Expand Down

0 comments on commit 0ad74ec

Please sign in to comment.