You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix Evaluator's format issues caused by special characters in the expression
This commit is contained in:
@@ -389,7 +389,9 @@ void EditorDebuggerInspector::add_stack_variable(const Array &p_array, int p_off
|
|||||||
}
|
}
|
||||||
|
|
||||||
PropertyInfo pinfo;
|
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.type = v.get_type();
|
||||||
pinfo.hint = h;
|
pinfo.hint = h;
|
||||||
pinfo.hint_string = hs;
|
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_list.insert_before(current, pinfo);
|
||||||
}
|
}
|
||||||
variables->prop_values[type + n][0] = v;
|
variables->prop_values[pinfo.name][0] = v;
|
||||||
variables->update();
|
variables->update();
|
||||||
edit(variables);
|
edit(variables);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3977,6 +3977,7 @@ void EditorInspector::update_tree() {
|
|||||||
name_override = name_override.substr(0, dot);
|
name_override = name_override.substr(0, dot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
name_override = name_override.uri_decode();
|
||||||
|
|
||||||
// Don't localize script variables.
|
// Don't localize script variables.
|
||||||
EditorPropertyNameProcessor::Style name_style = property_name_style;
|
EditorPropertyNameProcessor::Style name_style = property_name_style;
|
||||||
|
|||||||
Reference in New Issue
Block a user