Description
Created by: Zetrypio
Description
When I close Processing using the button on the right of the window title bar or by pressing Alt-F4
, changes to preferences (except language for some reasons) are not saved after a restart. The problem also include the Welcome Screen and the Theme Selector (see below). However, there are no problems if I close using Menu Bar -> File -> Quit or by pressing Ctrl-Q
.
Expected Behavior
Preferences should be saved whatever the way I close Processing.
Current Behavior
Preferences are not saved when I close Processing using the button on the right of the window title bar or by pressing Alt-F4
.
This includes:
- Preferences from the Preference Window (except language selection)
- The Welcome Screen (if I close that window using the button on the right of the window title bar or by pressing
Alt-F4
(and not by the "Get Started" button), and then closing Processing the same way) - Theme Selection (however this has been fixed in Theme is not kept after relaunch #565 by another way, but it was exactly the same base problem (if you look closely in the comments from the original poster of that issue, you will see that the problem was there, because changing the font size was also not saved)).
- Basically, every things that are saved in
preferences.txt
and that are editable from Processing itself (except language selection).
Steps to Reproduce
These steps assume the Welcome Screen is disabled at the start.
- Open a new instance of Processing and go to Preferences
- Change some preferences (it doesn't matter if these needs a restart or not)
- You may also change the language
- Close the preference window using the "Ok" button at the bottom of the preference window
- Close Processing using the button on the right of the window title bar or by pressing
Alt-F4
- Restart Processing
- You should see in Preferences that only the language has been updated. If you didn't do step 3, you should see that nothing has been saved.
- Change some other Preferences
- Close the preference window using the "Ok" button at the bottom of the preference window
- Close Processing using Menu Bar -> File -> Quit or by pressing
Ctrl-Q
- Restart Processing
- You should see in Preferences that this time everything has been updated.
- Now, go to Menu Bar -> Help -> Welcome to Processing to show the welcome screen
- Tick the box to "Show this message on startup" so it is now active (assuming it was not active before).
- Close the Welcome Screen using the button on the right of the window title bar or by pressing
Alt-F4
- Close Processing using the button on the right of the window title bar or by pressing
Alt-F4
- Restart Processing
- You should see that the Welcome Screen is NOT present.
- Go back to the Welcome Screen and re-enable it once again.
- Either
- a) Close the Welcome Screen using the button on the right of the window title bar or by pressing
Alt-F4
then close Processing using Menu Bar -> File -> Quit or by pressingCtrl-Q
- b) Or close the Welcome Screen using the "Get Started" button and then close Processing (any ways are possible here)
- Restart Processing
- This time, you should see the Welcome Screen shows up correctly.
Your Environment
- Processing version: Processing 4.0.2
- Operating System and OS version: Windows 10 22H2
- Other information: This problem is not happening to me with Processing 3.x, but it is happening in Processing 4.0.1, and one of the beta for Processing 4 that I once tested before (don't remember which one). I've also asked another person who just installed Processing on Windows 11 and that person had the exact same problem.
Possible Causes / Solutions
The Preference.save()
method is not executed when the user closes Processing whatever the way.
Doing the saving in the Preference window and the Welcome Screen is a good idea, but that only may not be sufficient since it means that this problem can be raised again in the future if another window needs to save some preferences.