-
-
Notifications
You must be signed in to change notification settings - Fork 22.4k
Fix Ignore External Changes Bug #106714
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
base: master
Are you sure you want to change the base?
Fix Ignore External Changes Bug #106714
Conversation
As I suggested in the issue, it would be better to save only the scenes in the list, instead of using |
@KoBeWi Thanks for your feedback. I have been reading the code for a while and I found just one reference containing the information of external unsaved files. This tree, called Just to be sure you have spotted, calling the Do you still would prefer a new function like Edit :Reading the code again, I can see that _save_all_scenes() call Suggestion 1 : Suggestion 2: |
The reason I think it's better to save only modified scenes is that this information is already available. I'd go with your suggestion 1. You can add a |
248b865
to
7f5f1ef
Compare
Note that the project is also saved only if it was externally modified. I assumed that it should work this way. |
Fix Issue godotengine#106410 : Add a new list `disk_changed_scenes()` and a boolean `disk_changed_project` to keep track of modfied scenes and the project. Save them only if they are in the list or the boolean value is true, when ignoring external changes.
7f5f1ef
to
b39a2e5
Compare
need_reload = true; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary blank line. Same below.
String scene_path = editor_data.get_scene_path(i); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String scene_path = editor_data.get_scene_path(i); | |
const String scene_path = editor_data.get_scene_path(i); |
for (uint32_t i = 0; i < disk_changed_scenes.size(); i++) { | ||
String scene_path = disk_changed_scenes[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (uint32_t i = 0; i < disk_changed_scenes.size(); i++) { | |
String scene_path = disk_changed_scenes[i]; | |
for (const String &scene_path : disk_changed_scenes) { |
Fix Issue #106410 : Add a check for external modified scene files (_is_scene_externally_modified()) before handling the logic of ignoring external changes.