Fix default values in fc2dconfig

This commit is contained in:
Epicalert 2021-07-19 02:54:32 +08:00
parent 45e90164fb
commit 5e606e3120
No known key found for this signature in database
GPG key ID: CAA46F858D0979BD

View file

@ -69,11 +69,6 @@ ConfigurationFrame::ConfigurationFrame() : wxFrame(NULL, wxID_ANY, "Configure "
cameraSizer->Add(cameraText, 0, wxALIGN_CENTER | wxALL, 5); cameraSizer->Add(cameraText, 0, wxALIGN_CENTER | wxALL, 5);
cameraSizer->Add(cameraSpinCtrl, 0, wxLEFT, 20); cameraSizer->Add(cameraSpinCtrl, 0, wxLEFT, 20);
// set default values
useHaarCheckBox->SetValue(false);
showCameraCheckBox->SetValue(false);
noEyesCheckBox->SetValue(false);
cameraSpinCtrl->SetValue(0);
// define tooltips // define tooltips
useHaarCheckBox->SetToolTip("Use Haar Cascades for faster (but less accurate) face detection."); useHaarCheckBox->SetToolTip("Use Haar Cascades for faster (but less accurate) face detection.");
@ -117,7 +112,13 @@ ConfigurationFrame::ConfigurationFrame() : wxFrame(NULL, wxID_ANY, "Configure "
} }
void ConfigurationFrame::loadExistingConfig() { void ConfigurationFrame::loadExistingConfig() {
struct optData configData; struct optData configData = {
false,
false,
false,
"",
0
};
configFileOpen(&configData); configFileOpen(&configData);
useHaarCheckBox->SetValue(configData.useHaar); useHaarCheckBox->SetValue(configData.useHaar);