mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 13:42:48 +00:00
GUIの自動開始設定の挙動が正しくなかったのを修正
This commit is contained in:
parent
6494205283
commit
9c7ab0df1f
@ -1997,6 +1997,8 @@ public:
|
||||
|
||||
// ドロップされたファイル数を取得
|
||||
UINT FileNum = DragQueryFile((HDROP)wParam, 0xFFFFFFFF, szTmp, _countof(szTmp));
|
||||
if (FileNum > 0)
|
||||
{
|
||||
if (FileNum == 1)
|
||||
{
|
||||
DragQueryFile((HDROP)wParam, 0, szTmp, _countof(szTmp));
|
||||
@ -2006,6 +2008,7 @@ public:
|
||||
}
|
||||
else if (FileNum > 1)
|
||||
{
|
||||
input_str.clear();
|
||||
input_str_multi.clear();
|
||||
|
||||
for (UINT i = 0; i < FileNum; i++)
|
||||
@ -2024,10 +2027,11 @@ public:
|
||||
}
|
||||
|
||||
if (SendMessage(GetDlgItem(dh, IDC_RADIO_AUTO_START_ONE), BM_GETCHECK, 0, 0) ||
|
||||
(SendMessage(GetDlgItem(dh, IDC_RADIO_AUTO_START_MULTI), BM_GETCHECK, 0, 0) && input_str_multi.size() > 0))
|
||||
(SendMessage(GetDlgItem(dh, IDC_RADIO_AUTO_START_MULTI), BM_GETCHECK, 0, 0) && (input_str_multi.size() > 0 || boost::filesystem::is_directory(szTmp))))
|
||||
{
|
||||
::PostMessage(GetDlgItem(dh, IDC_BUTTON_EXEC), BM_CLICK, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return 0L;
|
||||
}
|
||||
@ -2130,13 +2134,14 @@ public:
|
||||
{
|
||||
szFile[szFile.size() - 1] = TEXT('\0');
|
||||
|
||||
input_str_multi.clear();
|
||||
|
||||
const TCHAR * ptr = szFile.data();
|
||||
|
||||
const auto firstLen = _tcslen(ptr);
|
||||
if (firstLen > 0)
|
||||
{
|
||||
input_str.clear();
|
||||
input_str_multi.clear();
|
||||
|
||||
if(firstLen + 2 >= szFile.size() || ptr[firstLen + 1] == '\0')
|
||||
OnSetInputFilePath(ptr);
|
||||
else
|
||||
@ -2168,7 +2173,7 @@ public:
|
||||
}
|
||||
|
||||
if ( SendMessage(GetDlgItem(dh, IDC_RADIO_AUTO_START_ONE), BM_GETCHECK, 0, 0) ||
|
||||
(SendMessage(GetDlgItem(dh, IDC_RADIO_AUTO_START_MULTI), BM_GETCHECK, 0, 0) && input_str_multi.size() > 0))
|
||||
(SendMessage(GetDlgItem(dh, IDC_RADIO_AUTO_START_MULTI), BM_GETCHECK, 0, 0) && (input_str_multi.size() > 0 || boost::filesystem::is_directory(szFile.data()))))
|
||||
{
|
||||
::PostMessage(GetDlgItem(dh, IDC_BUTTON_EXEC), BM_CLICK, 0, 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user