浏览代码

Fix resolve class inheritance after file rename

Hilderin 1 年之前
父节点
当前提交
d199f1f0d5
共有 1 个文件被更改,包括 1 次插入9 次删除
  1. 1 9
      modules/gdscript/gdscript_cache.cpp

+ 1 - 9
modules/gdscript/gdscript_cache.cpp

@@ -155,15 +155,7 @@ void GDScriptCache::move_script(const String &p_from, const String &p_to) {
 		return;
 		return;
 	}
 	}
 
 
-	if (singleton->parser_map.has(p_from) && !p_from.is_empty()) {
-		singleton->parser_map[p_to] = singleton->parser_map[p_from];
-	}
-	singleton->parser_map.erase(p_from);
-
-	if (singleton->parser_inverse_dependencies.has(p_from) && !p_from.is_empty()) {
-		singleton->parser_inverse_dependencies[p_to] = singleton->parser_inverse_dependencies[p_from];
-	}
-	singleton->parser_inverse_dependencies.erase(p_from);
+	remove_parser(p_from);
 
 
 	if (singleton->shallow_gdscript_cache.has(p_from) && !p_from.is_empty()) {
 	if (singleton->shallow_gdscript_cache.has(p_from) && !p_from.is_empty()) {
 		singleton->shallow_gdscript_cache[p_to] = singleton->shallow_gdscript_cache[p_from];
 		singleton->shallow_gdscript_cache[p_to] = singleton->shallow_gdscript_cache[p_from];