Fix welcome window closing when last editor is closed#1482
Open
Jhnv07 wants to merge 1 commit intoprocessing:mainfrom
Open
Fix welcome window closing when last editor is closed#1482Jhnv07 wants to merge 1 commit intoprocessing:mainfrom
Jhnv07 wants to merge 1 commit intoprocessing:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #1456
Summary
This PR fixes an issue where closing the last editor window also caused the Welcome window to close. The IDE currently treats the closing of the final editor as an application exit condition, which unintentionally closes the Welcome window as well.
Changes
The logic in
Base.handleClose()has been updated so that when the last editor window is closed, the IDE shows the Welcome screen instead of exiting immediately. This ensures that the Welcome window remains available after closing the final editor, matching the expected behavior.Validation
The change was tested locally by building and running Processing4 and verifying the following scenarios:
Notes
During testing, I noticed an additional edge case: if the Welcome window is manually closed first and the final editor window is then closed, the Welcome screen reopens. This appears to be related to the logic relying on the
welcome.four.showpreference rather than tracking whether the Welcome window was closed during the session. I would be happy to investigate this behavior further if needed.