mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 13:42:48 +00:00
GUI版でコマンドラインオプションでのcropの指定が動いていなかったのを修正
This commit is contained in:
parent
33776e5154
commit
1656647163
@ -422,6 +422,9 @@ bool DialogEvent::SyncMember(const bool NotSyncCropSize, const bool silent)
|
|||||||
|
|
||||||
void DialogEvent::SetCropSizeList(const boost::filesystem::path & input_path)
|
void DialogEvent::SetCropSizeList(const boost::filesystem::path & input_path)
|
||||||
{
|
{
|
||||||
|
if (isSetInitCrop)
|
||||||
|
return;
|
||||||
|
|
||||||
HWND hcrop = GetDlgItem(dh, IDC_COMBO_CROP_SIZE);
|
HWND hcrop = GetDlgItem(dh, IDC_COMBO_CROP_SIZE);
|
||||||
|
|
||||||
int gcd = 1;
|
int gcd = 1;
|
||||||
@ -1223,7 +1226,7 @@ DialogEvent::DialogEvent() : mode(Waifu2x::eWaifu2xModelTypeNoiseScale), modeStr
|
|||||||
process("gpu"), outputExt(TEXT(".png")), inputFileExt(TEXT("png:jpg:jpeg:tif:tiff:bmp:tga")),
|
process("gpu"), outputExt(TEXT(".png")), inputFileExt(TEXT("png:jpg:jpeg:tif:tiff:bmp:tga")),
|
||||||
use_tta(false), output_depth(8), crop_size(128), batch_size(1), gpu_no(0), isLastError(false), scaleType(eScaleTypeEnd),
|
use_tta(false), output_depth(8), crop_size(128), batch_size(1), gpu_no(0), isLastError(false), scaleType(eScaleTypeEnd),
|
||||||
TimeLeftThread(-1), TimeLeftGetTimeThread(0), isCommandLineStart(false), tAutoMode(TEXT("none")),
|
TimeLeftThread(-1), TimeLeftGetTimeThread(0), isCommandLineStart(false), tAutoMode(TEXT("none")),
|
||||||
isArgStartAuto(true), isArgStartSuccessFinish(true), isOutputNoOverwrite(false), isNotSaveParam(false)
|
isArgStartAuto(true), isArgStartSuccessFinish(true), isOutputNoOverwrite(false), isNotSaveParam(false), isSetInitCrop(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void DialogEvent::Exec(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
void DialogEvent::Exec(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
||||||
@ -2246,6 +2249,7 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
|||||||
SetWindowText(GetDlgItem(dh, IDC_COMBO_CROP_SIZE), to_tstring(cmdCropSizeFile.getValue()).c_str());
|
SetWindowText(GetDlgItem(dh, IDC_COMBO_CROP_SIZE), to_tstring(cmdCropSizeFile.getValue()).c_str());
|
||||||
|
|
||||||
isSetParam = true;
|
isSetParam = true;
|
||||||
|
isSetInitCrop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdBatchSizeFile.isSet())
|
if (cmdBatchSizeFile.isSet())
|
||||||
@ -2342,6 +2346,8 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
|||||||
|
|
||||||
LocalFree(lplpszArgs);
|
LocalFree(lplpszArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isSetInitCrop = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogEvent::Cancel(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
void DialogEvent::Cancel(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
||||||
|
@ -113,6 +113,8 @@ private:
|
|||||||
|
|
||||||
bool isNotSaveParam;
|
bool isNotSaveParam;
|
||||||
|
|
||||||
|
bool isSetInitCrop;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
tstring AddName() const;
|
tstring AddName() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user