-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to correct the logic for setting m_pLaunchDarks control in profile_wizard.cpp #1271
Comments
Eyeke2
added a commit
to Eyeke2/phd2.planetary
that referenced
this issue
Dec 28, 2024
Signed-off-by: Leo Shatz <leonid.shatz@gmail.com>
Yes, it’s essentially a typo, it has the net effect of always initializing the checkbox to true. I’ll fix it as part of some other changes that are pending.
Thanks,
Bruce
From: Eyeke2 ***@***.***>
Sent: Saturday, December 28, 2024 3:11 AM
To: OpenPHDGuiding/phd2 ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [OpenPHDGuiding/phd2] Request to correct the logic for setting m_pLaunchDarks control in profile_wizard.cpp (Issue #1271)
In the STATE_WRAPUP case block of profile_wizard.cpp, the line:
m_pLaunchDarks->SetValue(m_useCamera || m_pLaunchDarks);
appears problematic, as m_pLaunchDarks is both the target and part of the condition. This could lead to unintended behavior.
If the intended logic is to enable the control when either m_useCamera or another variable (e.g., m_launchDarks) is true:
m_pLaunchDarks->SetValue(m_useCamera || m_launchDarks);
To enable the control only when both are true:
m_pLaunchDarks->SetValue(m_useCamera && m_launchDarks);
Relevant section from the STATE_WRAPUP block:
case STATE_WRAPUP:
SetTitle(TitlePrefix + _("Finish Creating Your New Profile"));
m_pGearGrid->Show(false);
m_pWrapUp->Show(true);
m_pNextBtn->SetLabel(_("Finish"));
m_pNextBtn->SetToolTip(_("Finish creating the equipment profile"));
m_pLaunchDarks->SetValue(m_useCamera || m_pLaunchDarks);
m_pInstructions->SetLabel(_("Enter a name for your profile and optionally launch the process to build a dark library"));
m_pAutoRestore->Show(m_PositionAware || m_SelectedAuxMount != _("None"));
m_pAutoRestore->SetValue(m_autoRestore);
SetSizerAndFit(m_pvSizer);
break;
—
Reply to this email directly, view it on GitHub <#1271> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADDHSV652OBFCTL7FZAD7FD2H2BK5AVCNFSM6AAAAABUJWVVUCVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DCNRXGY3TOMA> .
You are receiving this because you are subscribed to this thread. <https://github.com/notifications/beacon/ADDHSV236LLDD6VWDEW2BJD2H2BK5A5CNFSM6AAAAABUJWVVUCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKJG6X4I.gif> Message ID: ***@***.*** ***@***.***> >
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the STATE_WRAPUP case block of profile_wizard.cpp, the line:
m_pLaunchDarks->SetValue(m_useCamera || m_pLaunchDarks);
appears problematic, as m_pLaunchDarks is both the target and part of the condition. This could lead to unintended behavior.
If the intended logic is to enable the control when either m_useCamera or m_launchDarks is true:
m_pLaunchDarks->SetValue(m_useCamera || m_launchDarks);
To enable the control only when both are true:
m_pLaunchDarks->SetValue(m_useCamera && m_launchDarks);
Relevant section from the STATE_WRAPUP block:
The text was updated successfully, but these errors were encountered: