Skip to content

Board selection reverts after a "Save As..." #657

Open
@per1234

Description

@per1234

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

  1. Select File > New from the Arduino IDE menus.
  2. Take note of which board is selected.
  3. Select a different board.
  4. Select File > Save As... from the Arduino IDE menus.
  5. 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

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions