Skip to content
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

fix: prevent plot freeze when euler1d is running #480

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

j8xixo12
Copy link
Collaborator

@j8xixo12 j8xixo12 commented Mar 11, 2025

Fix #478 by updating plot object at set button callback function and keep _subwin as an attribute in Euler1DApp to prevent python's garbage collection from delete it because it's reference count is 0.

Screenshot :
image

Copy link
Member

@yungyuc yungyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good but CI hasn't completed. I will check again.

_subwin.setWidget(PlotArea(self))
_subwin.showMaximized()
_subwin.show()
self._subwin = self._mgr.addSubWindow(QWidget())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change to make it an instance member looks good. Thanks, @j8xixo12 .

@Sean20405 please take a look and comment.

@yungyuc yungyuc added pilot GUI and visualization onedim One-dimensional solver labels Mar 11, 2025
@Sean20405
Copy link
Contributor

Oh I know what I've forgot. The plot indeed redraw but the widget (or the sub-window) doesn't refresh. I'll check the functionality more carefully before giving a PR. Thanks to @j8xixo12's help!

@yungyuc yungyuc merged commit 0112d1e into solvcon:master Mar 11, 2025
12 checks passed
@yungyuc
Copy link
Member

yungyuc commented Mar 11, 2025

Now it updates. Thank you @j8xixo12 .

I kind of feel it updates faster than before, but I do not have an evidence.

@yungyuc yungyuc linked an issue Mar 11, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
onedim One-dimensional solver pilot GUI and visualization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use native PySide6 for modmesh.pilot euler1d stops from working after PR #476
3 participants