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

CloseWindow is now called when the Window is actually closed #4852

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Joost-Jens-Luminis
Copy link
Contributor

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

This is a bug fix.

⤵️ What is the current behavior?

When a window is closed by calling "window.close()" the Closing event isn't called. This even is only called when the Cross in the window is clicked. As a result, the CloseWindow function wasn't called and the ViewModel wasn't disposed.

🆕 What is the new behavior (if this is a feature change)?

By calling CloseWindow in the Closed event, when the CloseWindow function is called again and the ViewModel is disposed.
This is needed when you for example, want to show a popup to ask the user if they actually want to close, but you have to do this asynchrously.

💥 Does this PR introduce a breaking change?

No

🐛 Recommendations for testing

Nothing special.

📝 Links to relevant issues/docs

🤔 Checklist before submitting

  • [V ] All projects build
  • [ V] Follows style guide lines (code style guide)
  • [ V] Relevant documentation was updated (docs style guide)
  • [ V] Rebased onto current develop

@Joost-Jens-Luminis Joost-Jens-Luminis changed the title CLoseWindow is now called when the Window is actually called CloseWindow is now called when the Window is actually called May 10, 2024
@Joost-Jens-Luminis Joost-Jens-Luminis changed the title CloseWindow is now called when the Window is actually called CloseWindow is now called when the Window is actually closed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant