Open asmwarrior opened 4 days ago
void MathPlotDemoFrame::CleanPlot(void)
{
mPlot->DelAllPlot(true);
bottomAxis->SetAlign(mpALIGN_CENTERX);
bottomAxis->SetLogAxis(false);
leftAxis->SetAlign(mpALIGN_CENTERY);
leftAxis->SetLogAxis(false);
bottomAxis->SetAuto(true);
mPlot->DelLayer(mPlot->GetLayerByName(_T("BarChart")), true);
mPlot->DelLayer(mPlot->GetLayerByClassName("mpBitmapLayer"), true);
}
OK, adding the last line in the above function solved the remaining bitmap issue.
Will you add a pull request?
I'm not sure which part of my patch should be put in the pull request. Some of the code changes are from the wxSmith generation, I think I'm using the latest wxSmith code, while Lionel's wxSmith maybe a littler old, So, they have different code generation styles.
That's why I put the full patch here.
I add your code to the demo program.
About wxSmith, why the official release of C::B is always the 20.03 ? I use this release to be compatible (I just replace connect
by bind
for events).
I add your code to the demo program. About wxSmith, why the official release of C::B is always the 20.03 ? I use this release to be compatible (I just replace
connect
bybind
for events).
Hi, thanks.
I'm using the C::B nightly build version, for example: Nightly builds
Or, I have a github bot to build it, see here: asmwarrior/x86-codeblocks-builds: Automatically built codeblocks for both 32b and 64b Windows systems.
I think a new release will be 24.12. There is no official release between 20.03 to 24.12.
In one option of wxSmith(you can see it in its setting dialog), we can choose whether to generate the "Bind" or "Connect" option. I think the "Connect" is the default option.
Ok, I have updated with your latest build of C::B
The above is the code, I'm using the latest C::B, so the wxSmith may have different generated code than yours.
But the logic is simple, I just add a new button and an event handler for that button to show the image.
The problem is that after I draw the image, I try to click on another button, such as "draw sinus", but the image is not deleted by the function
CleanPlot()
, I'm not sure why.