From 623fb925b209b8e1f569c76ef9b3eb270c5700b1 Mon Sep 17 00:00:00 2001 From: lltcggie Date: Sat, 7 May 2016 17:17:34 +0900 Subject: [PATCH] =?UTF-8?q?GUI=E3=81=A7cmdScaleRatio=E3=81=AE=E5=84=AA?= =?UTF-8?q?=E5=85=88=E5=BA=A6=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waifu2x-caffe-gui/MainDialog.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/waifu2x-caffe-gui/MainDialog.cpp b/waifu2x-caffe-gui/MainDialog.cpp index 08aabfc..ab14c3d 100644 --- a/waifu2x-caffe-gui/MainDialog.cpp +++ b/waifu2x-caffe-gui/MainDialog.cpp @@ -2045,21 +2045,7 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData) isSetParam = true; } - if (cmdScaleRatio.isSet()) - { - SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_RATIO), BM_SETCHECK, BST_CHECKED, 0); - SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_WIDTH), BM_SETCHECK, BST_UNCHECKED, 0); - SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_HEIGHT), BM_SETCHECK, BST_UNCHECKED, 0); - - EnableWindow(GetDlgItem(dh, IDC_EDIT_SCALE_RATIO), TRUE); - EnableWindow(GetDlgItem(dh, IDC_EDIT_SCALE_WIDTH), FALSE); - EnableWindow(GetDlgItem(dh, IDC_EDIT_SCALE_HEIGHT), FALSE); - - SetWindowText(GetDlgItem(dh, IDC_EDIT_SCALE_RATIO), to_tstring(cmdScaleRatio.getValue()).c_str()); - - isSetParam = true; - } - else if (cmdScaleWidth.isSet()) + if (cmdScaleWidth.isSet()) { SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_RATIO), BM_SETCHECK, BST_UNCHECKED, 0); SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_WIDTH), BM_SETCHECK, BST_CHECKED, 0); @@ -2087,6 +2073,20 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData) isSetParam = true; } + else if (cmdScaleRatio.isSet()) + { + SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_RATIO), BM_SETCHECK, BST_CHECKED, 0); + SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_WIDTH), BM_SETCHECK, BST_UNCHECKED, 0); + SendMessage(GetDlgItem(hWnd, IDC_RADIO_SCALE_HEIGHT), BM_SETCHECK, BST_UNCHECKED, 0); + + EnableWindow(GetDlgItem(dh, IDC_EDIT_SCALE_RATIO), TRUE); + EnableWindow(GetDlgItem(dh, IDC_EDIT_SCALE_WIDTH), FALSE); + EnableWindow(GetDlgItem(dh, IDC_EDIT_SCALE_HEIGHT), FALSE); + + SetWindowText(GetDlgItem(dh, IDC_EDIT_SCALE_RATIO), to_tstring(cmdScaleRatio.getValue()).c_str()); + + isSetParam = true; + } if (cmdProcess.isSet()) {