summaryrefslogtreecommitdiffstats
path: root/core/config/project_settings.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-02-10 14:31:29 +0100
committerGitHub <noreply@github.com>2021-02-10 14:31:29 +0100
commitb1c60c757f55e300b2fccc457f0ea15b095dbec4 (patch)
tree07e828732de4f93f4431cc37677793bae9a2444a /core/config/project_settings.cpp
parentbad2998fea7c5b13688a507de76f8925210a9bf0 (diff)
parentc390c82014c23d7396cec731fceb515a354fe752 (diff)
downloadredot-engine-b1c60c757f55e300b2fccc457f0ea15b095dbec4.tar.gz
Merge pull request #31747 from KoBeWi/scene_stalking
Detect external modification of scenes
Diffstat (limited to 'core/config/project_settings.cpp')
-rw-r--r--core/config/project_settings.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 70e8133eaa..9b28ef7b81 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -597,6 +597,7 @@ Error ProjectSettings::_load_settings_text(const String &p_path) {
// If we're loading a project.godot from source code, we can operate some
// ProjectSettings conversions if need be.
_convert_to_last_version(config_version);
+ last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
return OK;
} else if (err != OK) {
ERR_PRINT("Error parsing " + p_path + " at line " + itos(lines) + ": " + error_text + " File might be corrupted.");
@@ -676,7 +677,11 @@ void ProjectSettings::clear(const String &p_name) {
}
Error ProjectSettings::save() {
- return save_custom(get_resource_path().plus_file("project.godot"));
+ Error error = save_custom(get_resource_path().plus_file("project.godot"));
+ if (error == OK) {
+ last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
+ }
+ return error;
}
Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) {