Closed
Description
Describe the problem
Under either of the following conditions, closing the Arduino IDE window would result in loss of sketch content:
- New or example sketch staged in a temporary folder
- Unsaved changes (user has disabled "Auto save")
As is standard for any application, the Arduino IDE notifies the user of this situation when they initiate a window close operation.
🐛 The presented dialogs are significantly different depending on which combination of the above conditions are present:
Saved | New | "will not be saved" dialog | "Save your sketch" dialog |
---|---|---|---|
Y | Y | N | Y |
N | Y | Y | Y |
N | N | Y | N |
To reproduce
- Select File > Preferences... from the Arduino IDE menus.
- Check the box next to "☐ Auto save".
- Click the OK button.
- Select File > New from the Arduino IDE menus.
- Make any change to the sketch.
❗ Do not save the sketch. - Select File > Close from the Arduino IDE menus.
🙂 Dialog offering save is presented:
- Click the Cancel button.
- Select File > Preferences... from the Arduino IDE menus.
- Uncheck the box next to "
☑
Auto save". - Click the OK button.
- Make any change to the sketch.
❗ Do not save the sketch. - Select File > Close from the Arduino IDE menus.
🙁 Unintuitive and unhelpful "Any unsaved changes will not be saved" dialog appears:
- Click the Yes button.
😕 Dialog offering save is presented. - Click the Cancel button.
- Select File > Save As... from the Arduino IDE menus.
- Save the sketch to any location and name you like.
- Make any change to the sketch.
❗ Do not save the sketch. - Select File > Close from the Arduino IDE menus.
🙁 Unintuitive and unhelpful "will not be saved" dialog appears. - Click the Yes button.
🐛 Standard dialog offering save is not presented.
Expected behavior
Always show only the "Save your sketch" dialog.
Eradicate the unintuitive (#677) and unhelpful (#170) "Any unsaved changes will not be saved" dialog from the IDE.
Arduino IDE version
2.0.0-rc6-snapshot-5b486b1
Operating system
Windows, Linux
Operating system version
Windows 10, Ubuntu 20.04
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details