Improve appearance of [connection] and [editable] sections in .tscn files

(cherry picked from commit 02c0edac60)
This commit is contained in:
Danil Alexeev 2020-09-29 14:01:01 +03:00 committed by Rémi Verschelde
parent f7ed1f4d1f
commit ebb5821bce
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1741,6 +1741,9 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
}
for (int i = 0; i < state->get_connection_count(); i++) {
if (i == 0) {
f->store_line("");
}
String connstr = "[connection";
connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\"";
@ -1765,7 +1768,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
Vector<NodePath> editable_instances = state->get_editable_instances();
for (int i = 0; i < editable_instances.size(); i++) {
f->store_line("\n[editable path=\"" + editable_instances[i].operator String() + "\"]");
if (i == 0) {
f->store_line("");
}
f->store_line("[editable path=\"" + editable_instances[i].operator String() + "\"]");
}
}