1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Fix Resource doesn't update when overwritten in editor

This commit is contained in:
LuoZhihao
2025-06-29 01:08:11 +08:00
parent 4e6ac9bccc
commit 0c74c0978f
2 changed files with 11 additions and 6 deletions

View File

@@ -525,15 +525,14 @@ void QuickOpenResultContainer::_use_default_candidates() {
if (history) {
candidates.append_array(*history);
}
int count = candidates.size();
candidates.resize(MIN(max_total_results, filepaths.size()));
int count = candidates.size();
int i = 0;
for (const String &filepath : filepaths) {
if (count >= max_total_results) {
if (i >= count) {
break;
}
if (!history || !history_set.has(filepath)) {
_setup_candidate(candidates.write[count++], filepath);
}
_setup_candidate(candidates.write[i++], filepath);
}
}