BlackboardPlan: Update mapping after variable renamed

Currently, only for owned variables, not parent's.
This commit is contained in:
Serhii Snitsaruk 2024-05-17 10:00:12 +02:00
parent d920060dee
commit d08018b7b1
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
1 changed files with 5 additions and 0 deletions

View File

@ -273,6 +273,11 @@ void BlackboardPlan::rename_var(const StringName &p_name, const StringName &p_ne
var_map.erase(p_name); var_map.erase(p_name);
var_map.insert(p_new_name, var); var_map.insert(p_new_name, var);
if (parent_scope_mapping.has(p_name)) {
parent_scope_mapping[p_new_name] = parent_scope_mapping[p_name];
parent_scope_mapping.erase(p_name);
}
notify_property_list_changed(); notify_property_list_changed();
emit_changed(); emit_changed();
} }