Skip to content

Saved sketch is not opened after "Save As" operation #829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
per1234 opened this issue Feb 13, 2022 · 2 comments · Fixed by #880
Closed

Saved sketch is not opened after "Save As" operation #829

per1234 opened this issue Feb 13, 2022 · 2 comments · Fixed by #880
Assignees
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 13, 2022

Describe the bug

The established behavior of the Arduino IDE and applications in general is that the saved file/project is opened after a "Save As..." operation.

🐛 Arduino IDE does not open the saved sketch after a "Save As..." operation. Instead, the sketch that was open in the IDE before the operation remains open.

To Reproduce

  1. Select File > New from the Arduino IDE menus.
    🛈: The bug is not specific to new sketches.
  2. Select File > Save As... from the Arduino IDE menus.
  3. Save the sketch with the name "SaveAsTarget".

🐛 The "SaveAsTarget" sketch is not opened by the IDE.

Expected behavior

Target sketch is opened in the IDE after a "Save As..." operation.

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc3-snapshot-2f9bf86
    Date: 2022-02-11T14:52:06.341Z
    CLI Version: 0.21.0 [10107d24]

Additional context

I bisected the bug to 112153f (it does not occur in the build from the previous commit 69ac1f4).


The target sketch is created.

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 13, 2022
@ubidefeo ubidefeo added criticality: high Of high impact labels Feb 17, 2022
@ubidefeo ubidefeo added this to the arduino-ide rc5 milestone Feb 17, 2022
@AlbyIanna
Copy link
Contributor

Another issue happens when closing an unsaved new file. I think it might be related

https://zube.io/files/arduino/df8bbd1580e1a7a32a856589dec9726e-screen-recording-2022-02-28-at-15-35-24.mov

@per1234
Copy link
Contributor Author

per1234 commented Mar 10, 2022

Another issue happens when closing an unsaved new file

Thanks @AlbyIanna. I finally got around to looking into this.

The loss of unsaved changes during a "Save As..." operation you observed is a long standing bug that has been tracked at #38

The description of #38 focused primarily on the unexpected sketch close, since that was the first problem the user encountered along the chain of "Save As..." misbehavior.

I believe the unexpected close part of the issue was fixed by #791, but that fix was difficult to see because it was somewhat masked by #829 (this issue). After #829 was fixed in #880, we finally get directly to the unsaved changes loss bug without the unexpected close bug to muddy the waters.

I decided that it would be most effective to track the unsaved changes loss bug in a dedicated issue and mark #38 as resolved. The new issue is here: #896

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants