this is ok, but It think it will be slightly clearer to not repeat the SelectObject code in both branches of the if (the reader can more easily see that the only difference between the branches is the resize quality and the toggle message)
wxImageResizeQuality resizeQuality;
wxString toggleMsg;
if (rawMode)
{
resizeQuality = wxIMAGE_QUALITY_NEAREST;
toggleMsg = _("Click image for interpolated view");
}
else
{
resizeQuality = wxIMAGE_QUALITY_HIGH;
toggleMsg = _("Click image for raw view");
}
wxImage subDImg = subDBmp.ConvertToImage();
wxMemoryDC tmpMdc;
tmpMdc.SelectObject(wxBitmap(subDImg.Rescale(width, width, resizeQuality)));
I forgot about persisting the choice, meant to do that. ☹ These are all good suggestions, I’ll take care of them tomorrow. Thanks.
From: Andy Galasso @.> Sent: Saturday, June 24, 2023 10:01 PM To: OpenPHDGuiding/phd2 @.> Cc: bwdev01 @.>; Author @.> Subject: Re: [OpenPHDGuiding/phd2] Star profile (PR #1082)
@agalasso commented on this pull request.
In star_profile.cpp https://github.com/OpenPHDGuiding/phd2/pull/1082#discussion_r1241028772 :
can we make this persistent? (a bool setting in pConfig->Global)
In star_profile.cpp https://github.com/OpenPHDGuiding/phd2/pull/1082#discussion_r1241028819 :
⬇️ Suggested change
In star_profile.cpp https://github.com/OpenPHDGuiding/phd2/pull/1082#discussion_r1241028841 :
⬇️ Suggested change
In star_profile.cpp https://github.com/OpenPHDGuiding/phd2/pull/1082#discussion_r1241030282 :
this is ok, but It think it will be slightly clearer to not repeat the SelectObject code in both branches of the if (the reader can more easily see that the only difference between the branches is the resize quality and the toggle message)
— Reply to this email directly, view it on GitHub https://github.com/OpenPHDGuiding/phd2/pull/1082#pullrequestreview-1496893481 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDHSVYYR7MUNNCS3ZVPEBTXM7AXRANCNFSM6AAAAAAZSXZJOQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ADDHSV5RHVOENG574TD7KVTXM7AXRA5CNFSM6AAAAAAZSXZJOSWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTSZHDECS.gif Message ID: @. @.> >