Skip to content

FormsPlot: Fix issue affecting plots on windows that have been closed and reopened#3646

Merged
swharden merged 16 commits intoScottPlot:mainfrom
CodeBehemoth:3589
Apr 12, 2024
Merged

FormsPlot: Fix issue affecting plots on windows that have been closed and reopened#3646
swharden merged 16 commits intoScottPlot:mainfrom
CodeBehemoth:3589

Conversation

@CodeBehemoth
Copy link
Contributor

My proposal to fix this issue is to instantiate the SKControl each time the form is shown.

In this PR:

  1. in Sandbox.WinForms: Launch-button added to Winforms Sandbox to reproduce issue FormsPlot: does not redraw after Dialog window opens second time #3589
  2. in ScottPlot.WinForms: Fix in FormsPlot

@swharden swharden changed the title 3589 FormsPlot: Fix issue affecting plots on windows that have been closed and reopened Apr 11, 2024
@CodeBehemoth
Copy link
Contributor Author

I tested this solution in 2 different applications with different chart types: it works without problems.

@swharden swharden linked an issue Apr 12, 2024 that may be closed by this pull request
@swharden
Copy link
Member

Hi @CodeBehemoth, thanks for this fix! I refactored your implementation a bit and moved your example out of the sandbox and into the demo app. I also added a related demo and a few Color niceties to this PR. I'm merging now and these features will be in the next release! 🚀

@swharden swharden enabled auto-merge April 12, 2024 23:21
@swharden swharden disabled auto-merge April 12, 2024 23:22
@swharden swharden merged commit 1d363db into ScottPlot:main Apr 12, 2024
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FormsPlot: does not redraw after Dialog window opens second time

3 participants