Fix the file status auto-detection setting not being set correctly

This commit is contained in:
oneill@users.noreply.github.com 2015-05-12 01:24:16 +02:00
parent 00c2e09d98
commit d98232b76e

View File

@ -914,7 +914,23 @@ BOOL CALLBACK SettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_UPDATESILENTLY), isChecked);
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_UPDATEGOTOEOF), isChecked);
nppGUI._fileAutoDetection = isChecked?cdAutoUpdate:cdDisabled;
bool isSilent = isCheckedOrNot(IDC_CHECK_UPDATESILENTLY);
bool isGo2End = isCheckedOrNot(IDC_CHECK_UPDATEGOTOEOF);
ChangeDetect cd;
if (!isChecked)
cd = cdDisabled;
else if (!isSilent && !isGo2End)
cd = cdEnabled;
else if (!isSilent && isGo2End)
cd = cdGo2end;
else if (isSilent && !isGo2End)
cd = cdAutoUpdate;
else //(isSilent && isGo2End)
cd = cdAutoUpdateGo2end;
nppGUI._fileAutoDetection = cd;
}
return TRUE;