Description
Describe the problem
🐛 After doing a "File > Save As..." operation, the board selection changes back to whichever one happened to be selected when the sketch was opened.
To reproduce
- Select File > New from the Arduino IDE menus.
- Take note of which board is selected.
- Select a different board.
- Select File > Save As... from the Arduino IDE menus.
- Save the sketch.
🐛 The selected board is now the one that was selected when the window was first opened (which could even be "No board selected"), not the one that was selected immediately before performing the "Save As... operation.
I think this could be very confusing to the user who doesn't notice the change and then wonders why compilation or uploads no longer work (or even the bricking of their board in certain cases).
Expected behavior
Board selection is preserved through "Save As... operations.
Arduino IDE version
Initial report
2.0.0-rc1-snapshot.f0d9894
Last checked with
2.0.0-rc9.2-snapshot-989300f
Operating system
Windows
Operating system version
10
Additional context
Reported at https://forum.arduino.cc/t/file-menu-save-as-fails-to-save-chosen-board/1022454
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