Skip to content
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

Modified GDScript code gets saved to disk without a prompt #18010

Closed
Rubonnek opened this issue Apr 5, 2018 · 8 comments · Fixed by #73641
Closed

Modified GDScript code gets saved to disk without a prompt #18010

Rubonnek opened this issue Apr 5, 2018 · 8 comments · Fixed by #73641

Comments

@Rubonnek
Copy link
Member

Rubonnek commented Apr 5, 2018

Godot version:
master branch commit eaa5dfb

Steps to reproduce:

  1. Save all the changes to a scene.
  2. Open a GDScript with the built-in editor and write some text to it and do not save those changes.
  3. Go to Scene->Quit to exit the editor, and click on Quit.
  4. The GDScript that was being modified gets saved to disk

I've also noticed that when editing a GDScript that was just saved, it is not getting marked as modified in the editor as soon as you start typing.

Minimal reproduction project:
saved_without_asking.zip

@eon-s
Copy link
Contributor

eon-s commented Apr 6, 2018

I do not know the system of the reported issue but I can confirm this on Ubuntu in master and 3.0.2 too.

@akien-mga akien-mga added this to the 3.1 milestone Apr 6, 2018
@AndreaCatania
Copy link
Contributor

AndreaCatania commented Apr 6, 2018

I got a similar issue, and I'm able to trigger it by doing this:

  • Modify a GDScript
  • Instead to save the file Press F5 to start the game

Now even if the editor show saving process the file was not saved and it became impossible to save. The only way to make it saving again is Close then Open the editor.

@reduz
Copy link
Member

reduz commented Sep 7, 2018

Maybe script text editor is applying (saving to disk) changes on exit?

@Piet-G
Copy link
Contributor

Piet-G commented Sep 7, 2018

Apparently this is just a feature of the editor and can be enabled/disabled with the interface/editor/save_each_scene_on_quit property. So this isn't a bug and can probably be closed?

EDIT: Don't mind that, it still saves with that property disabled :/

@akien-mga
Copy link
Member

Still reproducible in the current master branch.

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Dec 14, 2019
@Hex4F
Copy link

Hex4F commented Jun 4, 2021

This one's nasty! Combined with #40199 I think the only way to safely discard bad changes to a script is to forcibly kill the Godot process.

@Calinou
Copy link
Member

Calinou commented Jun 4, 2021

This is likely due to the script editor remembering script state across sessions. Can someone try to reproduce this on the latest master branch?

cc @Paulb23

@eon-s
Copy link
Contributor

eon-s commented Jun 20, 2021

I could reproduce it on master branch with the same steps.

@YuriSizov YuriSizov modified the milestones: 4.0, 4.1 Feb 20, 2023
@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 22, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in 4.x Priority Issues Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
10 participants