mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix Evaluator's format issues caused by special characters in the expression
This commit is contained in:
parent
2d113cc224
commit
7c31b8f6ea
2 changed files with 5 additions and 2 deletions
|
|
@ -389,7 +389,9 @@ void EditorDebuggerInspector::add_stack_variable(const Array &p_array, int p_off
|
|||
}
|
||||
|
||||
PropertyInfo pinfo;
|
||||
pinfo.name = type + n;
|
||||
// Encode special characters to avoid issues with expressions in Evaluator.
|
||||
// Dots are skipped by uri_encode(), but uri_decode() process them correctly when replaced with "%2E".
|
||||
pinfo.name = type + n.uri_encode().replace(".", "%2E");
|
||||
pinfo.type = v.get_type();
|
||||
pinfo.hint = h;
|
||||
pinfo.hint_string = hs;
|
||||
|
|
@ -403,7 +405,7 @@ void EditorDebuggerInspector::add_stack_variable(const Array &p_array, int p_off
|
|||
}
|
||||
variables->prop_list.insert_before(current, pinfo);
|
||||
}
|
||||
variables->prop_values[type + n][0] = v;
|
||||
variables->prop_values[pinfo.name][0] = v;
|
||||
variables->update();
|
||||
edit(variables);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3977,6 +3977,7 @@ void EditorInspector::update_tree() {
|
|||
name_override = name_override.substr(0, dot);
|
||||
}
|
||||
}
|
||||
name_override = name_override.uri_decode();
|
||||
|
||||
// Don't localize script variables.
|
||||
EditorPropertyNameProcessor::Style name_style = property_name_style;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue