File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ void NodePath::_update_hash_cache() const {
5252void NodePath::prepend_period () {
5353 if (data->path .size () && data->path [0 ].operator String () != " ." ) {
5454 data->path .insert (0 , " ." );
55+ data->concatenated_path = StringName ();
5556 data->hash_cache_valid = false ;
5657 }
5758}
@@ -179,15 +180,11 @@ NodePath::operator String() const {
179180 ret = " /" ;
180181 }
181182
182- for (int i = 0 ; i < data->path .size (); i++) {
183- if (i > 0 ) {
184- ret += " /" ;
185- }
186- ret += data->path [i].operator String ();
187- }
183+ ret += get_concatenated_names ();
188184
189- for (int i = 0 ; i < data->subpath .size (); i++) {
190- ret += " :" + data->subpath [i].operator String ();
185+ String subpath = get_concatenated_subnames ();
186+ if (!subpath.is_empty ()) {
187+ ret += " :" + subpath;
191188 }
192189
193190 return ret;
@@ -356,6 +353,7 @@ void NodePath::simplify() {
356353 }
357354 }
358355 }
356+ data->concatenated_path = StringName ();
359357 data->hash_cache_valid = false ;
360358}
361359
You can’t perform that action at this time.
0 commit comments