修复配置首选项恢复异常问题

This commit is contained in:
lovelyyoung 2020-08-15 18:24:05 +08:00
parent d4a87c304f
commit 9017ea67c8
1 changed files with 4 additions and 2 deletions

View File

@ -72,13 +72,15 @@ void CSaveConfigDlg::OnBnClickedOk()
if (!is_exist) { if (!is_exist) {
createDirectory((char*)dirpath.c_str()); createDirectory((char*)dirpath.c_str());
} }
citem.Caption = (CW2A)m_sName; //citem.Caption = (CW2A)m_sName;
_tcscat(szIniFile,m_sName+_TEXT(".json")); _tcscat(szIniFile,m_sName+_TEXT(".json"));
std::string s_savePath = TCHAR2STRING2(szIniFile); std::string s_savePath = TCHAR2STRING2(szIniFile);
citem.SavePath=s_savePath; //citem.SavePath=s_savePath;
GscanJsonConfig cfg; GscanJsonConfig cfg;
GScanCap caps = { 0 }; GScanCap caps = { 0 };
m_Parent->GetGScanCap(caps); m_Parent->GetGScanCap(caps);
caps.SavePath = s_savePath;
caps.Caption = (CW2A)m_sName;
cfg.SaveGscanCapConfig(caps,s_savePath); cfg.SaveGscanCapConfig(caps,s_savePath);
m_Parent->UpdateListConfig(); m_Parent->UpdateListConfig();
CDialog::OnOK(); CDialog::OnOK();