summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/resource_importer.cpp9
-rw-r--r--core/io/resource_importer.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp
index 427ce2c2cd..69907a710a 100644
--- a/core/io/resource_importer.cpp
+++ b/core/io/resource_importer.cpp
@@ -406,9 +406,14 @@ bool ResourceFormatImporter::are_import_settings_valid(const String &p_path) con
}
String ResourceFormatImporter::get_import_settings_hash() const {
+
+ Vector<Ref<ResourceImporter> > sorted_importers = importers;
+
+ sorted_importers.sort_custom<SortImporterByName>();
+
String hash;
- for (int i = 0; i < importers.size(); i++) {
- hash += ":" + importers[i]->get_importer_name() + ":" + importers[i]->get_import_settings_string();
+ for (int i = 0; i < sorted_importers.size(); i++) {
+ hash += ":" + sorted_importers[i]->get_importer_name() + ":" + sorted_importers[i]->get_import_settings_string();
}
return hash.md5_text();
}
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h
index db1befb51e..1d27d4dec3 100644
--- a/core/io/resource_importer.h
+++ b/core/io/resource_importer.h
@@ -77,7 +77,6 @@ public:
void add_importer(const Ref<ResourceImporter> &p_importer) {
importers.push_back(p_importer);
- importers.sort_custom<SortImporterByName>();
}
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;