Răsfoiți Sursa

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.
Mario Liebisch 2 ani în urmă
părinte
comite
b495c63b0b
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      editor/animation_track_editor.cpp

+ 2 - 2
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) {
 			if (i > 0) {
 				text += ", ";
 				text += ", ";
 			}
 			}
-			text += String(args[i]);
+			text += args[i].get_construct_string();
 		}
 		}
 		text += ")";
 		text += ")";
 
 
@@ -2539,7 +2539,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
 						if (i > 0) {
 						if (i > 0) {
 							text += ", ";
 							text += ", ";
 						}
 						}
-						text += String(args[i]);
+						text += args[i].get_construct_string();
 					}
 					}
 					text += ")\n";
 					text += ")\n";