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

This commit is contained in:
Danil Alexeev 2020-09-29 14:01:01 +03:00
parent aed16c8f84
commit 02c0edac60

View file

@ -1763,6 +1763,10 @@ 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)) + "\"";
connstr += " from=\"" + String(state->get_connection_source(i).simplified()) + "\"";
@ -1786,7 +1790,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() + "\"]");
}
}