From b495c63b0bdf28dd92ceebb531c21f34b8336390 Mon Sep 17 00:00:00 2001 From: Mario Liebisch <mario.liebisch@gmail.com> Date: Sun, 8 Jan 2023 09:47:56 +0100 Subject: [PATCH] Properly stringify args for Call Method Tracks This ensures string arguments are always shown as properly enclose in quotes and escaped and should help avoid confusion, as the previously shown key frame labels could display as invalid code, most prominently missing quote characters around strings. --- editor/animation_track_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 65bc7b24149..73094d984e9 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2231,7 +2231,7 @@ void AnimationTrackEdit::draw_key(int p_index, float p_pixels_sec, int p_x, bool if (i > 0) { text += ", "; } - text += String(args[i]); + text += args[i].get_construct_string(); } text += ")"; @@ -2539,7 +2539,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { if (i > 0) { text += ", "; } - text += String(args[i]); + text += args[i].get_construct_string(); } text += ")\n";