Unsaved changes are lost on "Language" preference change #954
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
The "Language" menu of the File > Preferences dialog now offers a selection of seven languages the Arduino IDE user interface can be localized to (#941).
🐛 Any unsaved changes to the sketch are lost after changing this preference.
To reproduce
☑
Auto save".❗ Do not save the sketch.
🐛 The unsaved change to the sketch is lost when the IDE window reloads.
Expected behavior
Make the unsaved state of the sketch persist through the reload.
-OR-
Present the user with a standard save dialog before doing the reload.
Arduino IDE version
2.0.0-rc5-snapshot-a3640cf
Operating system
Windows, Linux
Operating system version
Windows 10, Ubuntu 20.04
Additional context
I think this will occur for any preference that causes a reload on change, but I didn't find any others that have that behavior currently.
This was not introduced by #953. The unsaved changes were lost even with the reload method used before the change made in that PR.
Issue checklist
The text was updated successfully, but these errors were encountered: