From 5e606e3120d312e0df104d432e67570a8bf84ac7 Mon Sep 17 00:00:00 2001 From: Epicalert Date: Mon, 19 Jul 2021 02:54:32 +0800 Subject: [PATCH] Fix default values in fc2dconfig --- src/fc2dconfig.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/fc2dconfig.cpp b/src/fc2dconfig.cpp index d429072..a9c077d 100644 --- a/src/fc2dconfig.cpp +++ b/src/fc2dconfig.cpp @@ -69,11 +69,6 @@ ConfigurationFrame::ConfigurationFrame() : wxFrame(NULL, wxID_ANY, "Configure " cameraSizer->Add(cameraText, 0, wxALIGN_CENTER | wxALL, 5); cameraSizer->Add(cameraSpinCtrl, 0, wxLEFT, 20); - // set default values - useHaarCheckBox->SetValue(false); - showCameraCheckBox->SetValue(false); - noEyesCheckBox->SetValue(false); - cameraSpinCtrl->SetValue(0); // define tooltips 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() { - struct optData configData; + struct optData configData = { + false, + false, + false, + "", + 0 + }; configFileOpen(&configData); useHaarCheckBox->SetValue(configData.useHaar);